To execute one CLI command at a time, use the cr_cli tool. This tool invokes the CLI in single-line command mode.
Single-line command mode accepts one command at a time as input. Each command submitted must be complete; the user is not interactively prompted for the next input parameter. Operating in this mode, the Command Line Execution Client does not maintain a command history.
Here's an example of a CLI command executed with the cr_cli tool. This command adds a host of type prodserver to the host database. The user running this command, rbarnes, supplies his password to authenticate himself to the Master Server.
cr_cli –cmd hdb.h.add -user rbarnes -p XyZ572 -name webb1 –desc `web server 1' –tID prodserver |
cr_cli commands can be stored in a file and be called from a shell script. This is useful for repetitive tasks such as running execution plans, comparisons, or populating hosts.