
8: Device Ports
SLB™ Branch Office Manager User Guide
144
Table 8-18 Primary Commands
Command
Description
set
The
set
command assigns a value to a variable. Syntax:
set <variable> <value>
where <variable> is a word, and <value> can be defined in one of the following
ways:
A quoted string
A word
A variable reference
A value generated via one of the string secondary commands (compare,
match, first, etc.)
A value generated via the
expr
secondary command
A value generated via the
format
secondary command
A value generated via the
expr timestamp
command
unset
This command removes the definition of a variable within a script. Syntax:
unset <variable>
where
<variable>
is a word.
scan
The
scan
command is analogous to the C language scanf(). Syntax:
scan <variable> <format string> <value 1> <value 2> ...
<value n>
where
<variable>
a variable reference, and
<format string>
is a quoted
string. Each of the
<value x>
elements will be a word.
sleep
The
sleep
command suspends execution of the script (puts it to 'sleep') for the
specified number of seconds. Syntax:
sleep <value>
where
<value>
can be a word, a quoted string or a variable reference.
exec
The
exec
command executes a single CLI command. Currently only CLI 'show'
commands may be executed via exec. Syntax:
exec <CLI command>
send, send_user
The
send
command sends output to a sub-process, The
send_user
command sends output to the standard output. Both commands have the same
syntax:
send <string>
send_user <string>
where
<string>
can be either a quoted string or a variable reference.
expect,
expect_user,
expect_before,
expect_after,
expect_backgrou
nd
The
expect
command waits for input and attempts to match it against one or
more patterns. If one of the patterns matches the input the corresponding
(optional) command is executed. All
expect
commands have the same syntax:
expect {<string 1> {command 1} <string 2> {command 2}
... <string n> {command n}}
where
<string x>
will either be a quoted string, a variable reference or the
reserved word 'timeout.' The command x is optional, but the curly braces
('
{
' and '
}
') are required. If present it must be a primary command.
return
The
return
command terminates execution of the script and returns an optional
value to the calling environment. Syntax:
return <value>
where
<value>
can be a word or a variable reference.
Summary of Contents for 100-120 VAC SLB
Page 114: ...8 Device Ports SLB Branch Office Manager User Guide 114 Figure 8 4 Device Ports Settings ...
Page 131: ...8 Device Ports SLB Branch Office Manager User Guide 131 Figure 8 10 Devices Power Outlets ...
Page 174: ...9 USB Port SLB Branch Office Manager User Guide 174 Figure 9 3 Devices USB Modem ...