12: Scripts
EMG™ Edge Management Gateway User Guide
253
Interface Script Syntax
This section describes the abbreviated scripting syntax for Interface Scripts. This limited syntax
was created to prevent the creation of scripts containing potentially harmful commands. Script
commands are divided into three groups: Primary, Secondary and Control Flow.
Primary commands provide the basic functionality of a script and are generally the first element on
a line of a script, as in:
send_user "Password:"
Secondary commands provide support for the primary commands and are generally not useful by
themselves. For example, the
expr
command can be used to generate a value for a
set
command
.
set <my_var> [expr 1 + 1]
Control Flow
commands allow conditional execution of other commands based on the results
of the evaluation of a Boolean expression.
Table 12-4 Interface Script Syntax Definitions
Term
Definition
Word
A contiguous group of characters delimited on either side by spaces. Not enclosed
by double quotes.
Primary Command
One of the primary commands listed in this section.
Secondary Command
One of the secondary commands defined in this section.
Quoted String
A group of characters enclosed by double quote (") characters. A quoted string
may include any characters, including space characters. If a double quote
character is to be included in a quoted string it must be preceded (escaped) by a
backslash character ('\').
Variable Reference
A word (as defined above) preceded by a dollar sign character ('$').
CLI Command
A quoted string containing a valid CLI
show
command.
Arithmetic Operator
A single character representing a simple arithmetic operation. The character may
be one of the following:
A plus sign (+) representing addition
A minus sign (-) representing subtraction
An asterisk sign (*) representing multiplication
A forward slash (/) representing division
A percent sign (%) representing a modulus
Boolean Expression
An expression which evaluates to TRUE or FALSE. A Boolean expression has the
following syntax:
<value> <Boolean operator> <value>
Each can be either a word or a variable reference.
Boolean Operator
A binary operator which expresses a comparison between two operands and
evaluates to TRUE or FALSE. The following Boolean operators are valid:
'<' less than
'>' greater than
'<=' less than or equal to
'>=' greater than or equal to
'==' equal to
'!=' not equal to
Содержание 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 ...