Configuration Management script variables affecting command execution
- Last Updated: May 12, 2023
- 1 minute read
- WhatsUp Gold
- Version 2026
- Version 2025
- Version 2024
- Version 2023.1
When running a script, Configuration Management defines several script variables that contain information necessary to execute the script's commands. For example, the CommandPrompt variable contains a pattern (i.e., string or regular expression) that describes the command prompt string used by the device. This pattern is used to detect when the device is prompting for a command. Several other variables are also defined. A complete list of all script variables affecting command execution are listed in the following table. Configuration Management's assigns default values to each of these variables. If a script author wants to override Configuration Management's default behavior, he or she may do so by re-defining one or more of these variables. For example, if a script wants to override the command prompt pattern used to run the script, it can re-define the CommandPrompt variable to contain the pattern of choice.
Name | Value | Meaning | Example |
|---|---|---|---|
|
UserNamePrompt |
String or regular expression |
Pattern describing the username prompt displayed by the device when a user logs in |
"login as:" |
|
PasswordPrompt |
String or regular expression |
Pattern describing the password prompt displayed by the device when a user logs in |
"password:" |
|
CommandPrompt |
String or regular expression |
Pattern describing the command prompt displayed by the device when prompting the user for a command |
/.+(#|>) / |
|
MorePrompt |
String or regular expression |
Pattern describing the "more" prompt displayed by the device when displaying paged output |
/--More--|--More--/ |
|
MoreResponse |
String |
String to be entered in response to a "more" prompt |
"" |
|
LoginTerminator |
String |
Line termination sequence to be used with logging in |
"\r\n" |
|
CommandTerminator |
String |
Line termination sequence to be used when executing commands |
"\n" |