|
From the Command Line |
Top Previous Next |
|
Running Scripts from the Command Line
All of the scripts can be run from the command line for both Unix/Linux and MS Windows. They are run by typing in the individual program name and options. There are slight differences in the setup between running the scripts from Unix/Linux and MS Windows. Note, it is much more common to run the scripts from the command line in Linux, than it is for Windows. In Linux, shell scripts can be built which may contain many scripts all in one shell wrapper.
When running the scripts from the command line, the setup.var file is read from the current directory you are running the script from. If the setup.var does not exist in the current directory, it will automatically be created by the program. When it is created, the SCRIPT_HOME variable will get set to the current directory.
For MS Windows, the scripts are run from the cmd tool window (Start->All Programs->Accessories->command promt).
Although the scripts can be run from any directory, in order to stay organized, it is recommended they be run from the following directories or any new directories you create under these directories:
Linux: $HOME/net-scripts Windows: My Documents\Net-Sense\net-scripts
Below is a list of executable filenames for each of the scripts when run from the command line:
There are some generic options which may or may not apply to all of the scripts. In addition, there may be some required arguments as well as some script specific options. If the required arguments are not entered on the command line, the program will report an error. All programs can be run with the “-help” option to see generic options as well as the required arguments for the script. Below, shows an example of the ios_report program run with the –help option.
$ ios_report -help
Some options require a filename to be specified. In some cases that file will contain information that is needed by the script. Depending on the option, the format of the file may be a simple text file containing a list of routers or the file may be in TCL format. For the files that are in TCL format, TCL programming knowledge is NOT required. The TCL files edited by the user are only used to set script input variables. The only TCL knowledge required is the following:
|