8-7
Cisco Content Services Switch Administration Guide
OL-5647-02
Chapter 8 Using the CSS Scripting Language
Using Commented Lines
This is an example of a valid statement:
! Say hello
echo “Hello”
This is an example of an invalid statement:
echo “Hello” ! Say hello
Using the “! no echo” Comment
To disable the
echo
command without the text “no echo” appearing in the script
output, use the commented
no echo
command as the first line in any script. A
script actually executes the commented command
no echo
. (If you are familiar
with MS-DOS batch files, this command is similar to the
@echo off
DOS
command.) For example, enter:
! no echo
echo “Hello”
The output is:
Hello
If you enter:
! Print Echo
echo “Hello”
The output is:
echo “Hello”Hello
This happens because the script tells the script engine to print the
echo
command
to the screen. The result is that the script engine prints the
echo
command and its
argument (“Hello”) to the screen, followed by the output (Hello) of the command.
This is usually not a desired result, so you typically start most scripts with the
!no
echo
command as the first line.