5000 Series Layer 2/3 Managed Data Center Switch CLI Reference Guide
128
To view the configuration stored in the startup-config, backup-config, or factory-defaults file, the user can
use the
show {startup-
config | backup-config | factory-defaults}
command (please see
).
In general, scripts should be used on systems with the default configuration; however, it is also possible
to apply scripts on systems with configurations other than the default configurations.
Scripts are required to conform to the following rules:
•
The file extension for the script must be “.scr”.
•
The maximum number of scripts allowed on the switch is ten.
•
The maximum allowed size for all the script files on the switch combined is 2048 KB.
•
The maximum allowed number of command lines for
configuration files is 2000.
Single-line annotations for use at the command prompt can be typed in by the user when write testing or
configuring scripts in order to improve script readability. The beginning of a comment is flaged by the
exclamation point (!) character. More specifically, the comment flag character can be used to begin a
word at any point on the command line, with all input following this character being ignored. In other
words, any command line beginning with the “!” character is recognized by the parser as a comment line
and thus ignored.
The following lines provide an example of a script.
! Script file for displaying management access
show telnet !Disp1ays the information about remote connections
! Display information about direct connections
show serial
! End of the script file!
Note:
In the configuration script, a blank password for a user must be specified as a space within quotes.
For example, if the password for user jane is to be changed from a blank password to hello, then the
script entry would be as follows:
users passwd jane
“ “
hello
hello
4-152 script apply
This command is used to apply the commands in the script to the switch, where the name of the script to
apply is indicated by the
scriptname
parameter.
script apply scriptname
Parameters
scriptname
Indicates the file name of the configuration script.
Default
The default is None.
Command Mode
Privileged EXEC