Sample Scripts

This section explains how to use the sample scripts that are included with CLI. The functionality and prerequisites for each script is explained in the section.
casp102
This section explains how to use the sample scripts that are included with CLI. The functionality and prerequisites for each script is explained in the section.
The sample scripts included with CLI demonstrate how CLI commands can be incorporated into UNIX shell scripts so that you can automate your CLI sessions. You can find some of these scripts, or some of the functions within them, useful for your own work.
CLI includes the following scripts, and a readme file that describes the scripts in the
<$SPECROOT>
/vnmsh/sample_scripts directory:
Review the following prerequisites when you work with CLI scripts:
  • Each script has an internal variable named CLIPATH. To use a script, set the CLIPATH variable to the pathname of the directory where CLI executables are located.
  • The CLIPATH variable and the other environment variables that are pathnames can be
    full
    or
    relative
    pathnames depending on how the script is run. Use
    full
    pathnames for the CLIPATH and other environment variables when you run a sample script as a cron script. Otherwise, you can use
    relative
    pathnames for these variables.
  • Except for update_mtype, you can run all the CLI scripts as cron scripts.
    Do not run update_mtype as a cron script because it prompts the user for input.
  • When you run CLI scripts, specify the correct names for the vnm_hostname variable in the .vnmshrc file.
This section contains information about the following topics: