HP 3PAR OS 3.1.3 CLI Administrator's Manual

Forcing Commands
A number of CLI commands return confirmation prompts before executing the command operations.
For these commands, an f option is provided allowing you to bypass the confirmation and force
the execution of the command. The TPDFORCE environment variable automatically provides the
functionality of the -f option and alleviates the need of having to specify the f option when
issuing commands that would otherwise require a confirmation.
The TPDFORCE environment variable is set differently in Solaris, Linux, HP-UX, AIX and Windows.
Setting the TPDFORCE Environment Variable on Solaris, Linux, HP-UX, and AIX
To set the TPDFORCE environment variable in Solaris, Linux, HP-UX, and AIX see the following
system output example:
$ TPDFORCE=1
$ export TPDFORCE
$ cli
Setting the TPDFORCE Environment Variable on Windows
To set the TPDFORCE environment variable in Windows:
1. Perform Step 1 through Step 4 of the procedure for setting the TPDSOCKSSL environment
variable in Windows, as described in “Using SSL” (page 47).
2. Enter TPDFORCE in the Variable box.
3. Enter 1 in the Value box.
4. Click OK.
Stand-alone Commands
There are two ways to issue CLI commands from a shell prompt in Solaris, Linux, HP-UX, and AIX
or from a Windows command prompt:
CLI commands can be executed like typical UNIX and MS-DOS commands.
If the CLI commands are run as individual commands, you are prompted for your user
name and password for each command. This can be avoided by setting your system to
read your user name and password from a file. See “Setting Your Name and Password”
(page 49) for more information.
If you are running the CLI commands as individual commands, you can put each command
in a script or pipe them to other commands. You can use the shell of your choice for
scripting or for initiating interactive sessions that provide history and line editing
capabilities.
Enter cli at the DOS or Solaris, Linux, HP-UX, or AIX prompt to run the cli program. Running
this progrm places you into an interactive Tcl shell where all CLI commands are available.
The Tcl shell connects to the system and remains connected until you exit from the shell.
While the Tcl shell is connected, you are not prompted for your user name and password
for each command you issue.
The Tcl shell provides access to the Tcl language that allows you to write Tcl procedures
or source Tcl scripts that build on top of CLI commands.
58 Running the HP 3PAR Command Line Interface