Chapter 8
Using the CSS Scripting Language
Using the show variable Command
OL-5647-02
Use the show variable command to display all the variables currently set in the
CSS software environment.
The CLI uses the following special variables in its operation to control session
behavior and to enhance interaction with CLI commands and the user:
The USER variable is set automatically to the username starting the CLI
•
session at login time.
The LINE variable is set automatically to the line which the user is connected
•
to at login time.
The MODE variable is set automatically to the current mode as the user
•
navigates the hierarchy of CLI modes.
The STATUS variable is set automatically to return the exit status of the
•
previously executed CLI command. In most cases, with the exception of the
"grep" command, an exit status of 0 indicates a command was successful, and
a non-zero value indicates failure.
The CHECK_STARTUP_ERRORS variable, if set within a profile script,
•
indicates the user should be informed of startup-errors upon login. If the
startup-errors file is found in the log directory, the screen displays the
"***Startup Errors occurred on boot.***" message.
The CONTINUE_ON_ERROR variable controls how a script executing in an
•
interactive CLI session handles a command error. When you set this variable
in a script with the set command, the execution of a script continues when
errors are detected. If you do not set this variable in a script, the script
terminates when an error occurs.
You should exercise caution when using this variable. Syntax errors are
ignored when it is set. You should set this variable in the script where you
expect a command to fail and then disable it with the no set command.
Cisco Content Services Switch Administration Guide
Special Variables
8-21