Using The Script_Play Function; Bitwise Logical Operators - Cisco 11503 - CSS Content Services Switch Administration Manual

Content services switch
Hide thumbs Also See for 11503 - CSS Content Services Switch:
Table of Contents

Advertisement

Bitwise Logical Operators

Using the SCRIPT_PLAY Function

Bitwise Logical Operators
Cisco Content Services Switch Administration Guide
8-30
To call a script from another script, use the SCRIPT_PLAY function. The syntax
is:
function SCRIPT_PLAY call "ScriptName arg1 arg2..."
When you use the SCRIPT_PLAY function, use caution when dealing with the
exit script command. For details on exiting from a script, see
Within Another Script"
The CSS Scripting Language provides two operations for bit manipulation that
apply only to numeric values. The bitwise logical operators are:
BAND - Bitwise AND operation
BOR - Bitwise OR operation
You can manipulate the bits of a numeric variable using the modify command. For
example, if you have a numeric value of 13 and want to find out if the second and
fourth bits of the number are turned on (value of 1), you can do so using a bitwise
AND operation as follows:
00001101 (13)
AND
00001010 (10)
Result is 00001000 (8)
Notice that the fourth bit is common between the values 13 and 10, so the resulting
value contains only the common bits. To script this, do the following:
set VALUE "13"
modify VALUE "BAND" "10"
echo "Value is ${VALUE}"
The output is:
Value is 8
Chapter 8
later in this chapter.
Using the CSS Scripting Language
"Exiting a Script
OL-5647-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

11500 series

Table of Contents