Cisco 11503 Administration Guide - Page 274
Using the echo Command, Using Commented Lines
UPC - 746320664958
View all Cisco 11503 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 274 highlights
Using the echo Command Chapter 8 Using the CSS Scripting Language Using the echo Command When you play a script, the default behavior of the script is to display each command and its output. Use the echo command to control what appears on the screen during script execution. Because the goal of most scripts is to present clear, useful output, it is good practice to disable the echo command by using the no echo command. The no echo command tells the script engine not to print the commands being processed or their output to the terminal. Once you disable the echo command, you must use the echo command explicitly to print text to the screen. Echo is enabled automatically upon script termination. For a further explanation of the echo and no echo commands, see "Using the "! no echo" Comment" later in this chapter. Note All of the examples and their outputs shown in the remainder of this chapter assume that the echo command is disabled, unless otherwise stated. Using Commented Lines To write scripts that other users can understand and maintain, it is important to document your script with comments. Comments are particularly important when other users begin using and/or modifying your scripts. To make this process easier for you, you can add commented lines to your scripts. You denote comments with the exclamation mark (!) as the first character in any line of a script. For example, enter: ! I want a comment here so that I can tell you that I will ! execute a show variables command show variables This example begins with a comment for the user to read (note the exclamation mark). Any characters are allowed after a comment symbol, but the entire line must be a comment. In the third line, the script will execute a show variables command because it does not start with an exclamation mark. Cisco Content Services Switch Administration Guide 8-6 OL-5647-02