Cisco 11503 Administration Guide - Page 281
Using Logical and Relational Operators and Branch Commands, Boolean Logic and Relational Operators
UPC - 746320664958
View all Cisco 11503 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 281 highlights
Chapter 8 Using the CSS Scripting Language Using Logical and Relational Operators and Branch Commands Using Logical and Relational Operators and Branch Commands To build structured command blocks, use the if and while branch commands. The if command creates script branches based on the results of previous commands. The while command is a looping mechanism. Both commands facilitate efficient scripts with fewer repeated actions. Use both these branch commands with the endbranch command, which indicates to the CLI the end of a logical block of commands. Any branches created without a terminating endbranch command produce a script logic error and possibly a script syntax error. For information on script errors, see "Syntax Errors and Script Termination" later in this chapter. Note You can nest a maximum of 32 levels of branch commands. Boolean Logic and Relational Operators You can use each of the following operators with an if, while, or modify command. The Boolean logic operators used with branch commands are: • AND - Logical AND • OR - Logical OR The relational operators used with branch commands are: • GT - Greater than • LT - Less than • == - Equal to • NEQ - Not equal to • LTEQ - Less than or equal to • GTEQ - Greater than or equal to OL-5647-02 Cisco Content Services Switch Administration Guide 8-13