HP StorageWorks Command View XP Command Line Interface (CLI) reference guide (B9357-96161, January 2006)
Command View XP Command Line Interface (CLI) reference guide 187
When using the execute command, you cannot use the connect command in the file. It is mandatory to
issue the connect command before you issue the execute command. Also, you cannot use the
disconnect command in the batch file. You must issue it after processing the execute command. Note
that other commands are optional. A typical session sequence will be as follows:
connect 10044
other commands...
cvcli 10044(R)>execute listlun.txt
other commands...
cvcli 10044(R/W)>disconnect
Redirecting output with the -o option
Use the -o option to redirect output to a file.
XP48 and XP512
If the file contains any command with -o, then an error is flagged because the -o option is not supported
for commands within the batch file.
Example 1
This first command in the following batch file will fail to execute correctly.
list.txt contains:
list port -o port.out
list wwn
The command entered is:
CV_CLI 30055 (R)> execute list.txt
The results are:
<Item:1 LineNumber:1>-o option cannot be used inside a command file.
Please use the -o option within the execute command or the -f command.
Example 2
This command and batch file will execute correctly.
list.txt contains:
list port
The command entered is:
CV_CLI 30055 (R)> execute list.txt -o list.out
The results are:
Sending request to the CV server ...
Please find results in the file:list.out
XP128/XP1024/XP10000/XP12000
The -o option is supported for these disk arrays in both the batch file and the command line.
Specifying the -o option with a command in the file will send the command output to the file specified in
the command. If the -o option is not specified for a command, the output is sent to the file specified
“outside” the file, at the cvcli execution with -o or the execute command execution with -o.
Example 1
This command and batch file will execute correctly.
list.txt contains:
list port -o port.out
list ldev -o ldev.out
The command entered is:
CV_CLI 10039 (R/W)> execute list.txt -o all.out