Specifications
12-244
Cisco SN 5428-2 Storage Router Software Configuration Guide
78-15471-01
Chapter 12 Command Line Interface Reference
read script
read script
To read and execute the CLI commands in a command file, use the read script command.
read script command-file [force [parameters]]
Syntax Description
Defaults None.
Command Modes Administrator.
Command History
Usage Guidelines Use the show bootconfig and show runningconfig commands with the to keyword to create basic files
containing many of the CLI commands that were issued to create the SN 5428-2 Storage Router bootable
or currently running configuration. These files can be modified and used as command files to automate
common tasks.
You can also manually create a command file. If you have a set of CLI commands that you run
periodically, you can place them in a command file, copy that file to the storage router script directory
and use the read script command to execute them when needed.
Each command should be on a separate line or contain a backslash ( \ ) as the line continuation character
at the end of the line. At the end of a continuation sequence, add a blank line as a separator between the
sequence and any following command. Any line beginning with an exclamation mark (!) or a number
sign (#) is considered to be a comment and will not be executed.
When the command is issued without the force keyword, you are reminded that the action may change
the configuration of the storage router and are then prompted to confirm your actions. When the
command is issued with the force keyword, all warning prompts and messages are suppressed and the
script is executed immediately.
You can also pass optional parameters to the script to control processing. Any parameter that includes
spaces must be enclosed in quotation marks. Within the script, use the key character “@” to instruct the
script execution function to substitute the value of the specified parameter. Whenever the execution
function encounters @1, it substitutes the value of the first passed parameter. The value of the second
parameter is substituted for @2, and so forth.
See Chapter 11, “Maintaining and Managing the SN 5428-2 Storage Router,” for additional information
about using scripts to automate tasks.
command-file The name of the command file. The command file must exist in the script
directory.
force (Optional) Suppress warning prompts and messages and execute the script
immediately.
parameters (Optional) Pass one or more parameters to the specified script. If the
parameter includes spaces, enclose it in quotation marks.
Release Modification
3.2.1 This command was introduced.