Configuration Scripting allows you to generate text-formatted script files representing the current configuration of a system. You can upload these configuration script files to a PC or UNIX system and edit them. Then, you can download the edited files to the system and apply the new configuration. You can apply configuration scripts to one or more switches with no or minor modifications.
Use the show running-config command to capture the running configuration into a script. Use the copy command to transfer the configuration script to or from the switch. You should use scripts on systems with default configuration; however, you are not prevented from applying scripts on systems with non-default configurations.
Scripts must conform to the following rules:
You can type single-line annotations at the command prompt to use when you write test or configuration scripts to improve script readability. The exclamation point (!) character flags the beginning of a comment. The comment flag character can begin a word anywhere on the command line, and all input following this character is ignored. Any command line that begins with the "!" character is recognized as a comment line and ignored by the parser.
NOTE: To specify a blank password for a user in the configuration script, you must specify it as a space within quotes. For example, to change the password for user jane from a blank password to hello, the script entry is as follows:
users passwd jane
" "
hello
hello
This command applies the commands in the script to the switch. The <scriptname> parameter is the name of the script to apply.
This command deletes a specified script where the <scriptname> parameter is the name of the script to delete. The all option deletes all the scripts present on the switch.
This command lists all scripts present on the switch as well as the remaining available space.
This command displays the contents of a script file, which is named <scriptname>.
This command validates a script file by parsing each line in the script file where <scriptname> is the name of the script to validate.The validate option is intended to be used as a tool for script development. Validation identifies potential problems. It might not identify all problems with a given script on any given device.