12: Scripts
EMG™ Edge Management Gateway User Guide
254
Primary Commands
These are
stand-alone
commands which provide the primary functionality in a script. These
commands may rely on one or more of the Secondary Commands to provide values for some
parameters. The preprocessor will require that these commands appear only as the first element
of a command line. The start of a command line is delimited by any of the following:
The start of a new line of text in the script
A semicolon (';')
A left brace ('{')
Table 12-5 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.
Содержание EMG 7500
Страница 1: ...Part Number PMD 00008 Revision C April 2020 EMG Edge Management Gateway User Guide EMG 8500 EMG 7500 ...
Страница 82: ...7 Networking EMG Edge Management Gateway User Guide 82 Figure 7 2 Network Network Settings 2 of 2 ...
Страница 100: ...7 Networking EMG Edge Management Gateway User Guide 100 Figure 7 5 Network Wireless Settings ...
Страница 353: ...15 Maintenance EMG Edge Management Gateway User Guide 353 Figure 15 12 About EMG ...
Страница 474: ...EMG Edge Management Gateway User Guide 474 Figure E 3 EU Declaration of Conformity ...
Страница 475: ...EMG Edge Management Gateway User Guide 475 Figure E 4 EU Declaration of Conformity continued ...