EasyManuals Logo
Home>Cisco>Switch>11503 - CSS Content Services Switch

Cisco 11503 - CSS Content Services Switch User Manual

Cisco 11503 - CSS Content Services Switch
392 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #279 background imageLoading...
Page #279 background image
8-11
Cisco Content Services Switch Administration Guide
OL-5647-02
Chapter 8 Using the CSS Scripting Language
Using Variables
Example 3:
set MyVar1”1”
set Myvar2 “2”
set MyVar1 “${MyVar2}”
Note You can also apply the set and no set commands to character variables.
Using Arithmetic Operators
To change the value of a variable with arithmetic operators (-, +, /, *, or modulus),
use the modify command . For example, enter:
set MyVar “100”
modify MyVar “+” “2”
echo “Variable value is ${MyVar}.”
modify MyVar “-” “12”
echo “Variable value now is ${MyVar}.”
modify MyVar “*” “6”
echo “Variable value now is ${MyVar}.”
modify MyVar “/” “6”
echo “Variable value now is ${MyVar}.”
modify MyVar “MOD” “10”
echo “Variable modulus value now is ${MyVar}”
The output is:
Variable value is 102.
Variable value now is 90.
Variable value now is 540.
Variable value now is 90.
Variable modulus value now is 0.
For simple arithmetic operations, the modify command takes an operator in
quotes (for example, “/”, “*”, “+”, “-”, or “MOD”) and a new value in quotes. This
value does not have to be a constant (for example, “5” or “10”), but can be another
variable (for example, “${Var1}” or “${Var2}”). The modulus operator “MOD”
divides the variable by the specified value (in the above example “10”) and sets
the variable value to the remainder.
The following sections describe additional operations you can perform on
variables using the modify command. For more information on the modify
command, refer to the Cisco Content Services Switch Command Reference.

Table of Contents

Other manuals for Cisco 11503 - CSS Content Services Switch

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cisco 11503 - CSS Content Services Switch and is the answer not in the manual?

Cisco 11503 - CSS Content Services Switch Specifications

General IconGeneral
BrandCisco
Model11503 - CSS Content Services Switch
CategorySwitch
LanguageEnglish

Related product manuals