Command modes

You can work with the administrative CLI in one of three modes: single-shot, interactive, and script.

Single-shot mode

If you want to run only a single command, specify the administrative CLI utility and the command that you want to run from the shell prompt, for example:
shell> admin_cli_utility lsport
DEFAULT,Default,10000,2500,25,80,10,64,Default Storage Pool
admin_cli_utility> exit
shell>

Interactive mode

If you want to run several commands, start an administrative CLI session using the administrative CLI utility with no parameters, and then enter each command at the admin_cli_utility> prompt, for example:
shell> admin_cli_utility
admin_cli_utility> lspool -l -type default
DEFAULT,Default,10000,2500,25,80,10,64,Default Storage Pool
admin_cli_utility> exit
shell>

Script mode

If you want to run a set of commands that you defined in a file, use the administrative CLI utility with the –script parameter, for example:
shell> admin_cli_utility -script ~/bin/listpools.bat
You can add comments to the script file by placing a pound sign (#) in the first column, for example:
# This script file lists the default storage pool.
lspool -l -type default
Note: Output from successful commands routes to the standard output stream (stdout). Output from unsuccessful commands route to the standard error stream (stderr). If an error occurs while one of the commands in the script is running, the script will exit at the point of failure and return to the system prompt.

Parent topic: Administrative CLI overview

Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.