Custom Script Syntax - Lantronix 100-120 VAC SLB User Manual

Branch office manager
Table of Contents

Advertisement

Command
if, elseif and
else

Custom Script Syntax

This section describes the scripting syntax for Custom Scripts. The syntax is more flexible than
Interactive Script syntax, but still has restrictions to prevent the creation of scripts containing
potentially harmful commands. In addition, Custom Scripts can be configured to use command line
parameters. Custom Scripts have the following guidelines:
1. The size of the script file cannot exceed 6 Kbytes.
2. The size of the results generated by the script cannot exceed 1 Kbyte (any results over 1Kbyte
will be truncated).
3. The first line of the script must contain a Linux script style interpreter directive so that the SLB
will know which interpreter to use to run the script. The format of the first line is #! expect,
#! tcl, or #! python. When a custom script is imported, the interpreter line must match
the selected script or file type (Expect, Tcl or Python), otherwise the script will be invalid.
4. The script should include a spawn command to connect the script to either a SLB CLI session
or a SLB Device Port session. Refer to the following spawn command syntax:
SLB™ Branch Office Manager User Guide
Description
The
command executes an associated block of commands if its Boolean
if
expression evaluates to TRUE. Each command within the block must be a Primary
command. Syntax:
if {<Boolean expression>} {
command 1
command 2
...
command n
}
The
command is used in association with an
elseif
immediately follow an if or
commands if its Boolean expression evaluates to TRUE. Each command within the
block must be a Primay command. Syntax:
elseif {<Boolean expression>} {
command 1
command 2
...
command n
}
The
command is used in combination with an if or
else
provide a default path of execution. If the Boolean expressions for all preceding if
and
commands evaluate to FALSE the associated block of commands is
elseif
executed. Each command within the block must be a primary command. Syntax:
else {
command 1
command 2
...
command n
}
command. It executes an associated block of
elseif
8: Device Ports
command - it must
if
command to
elseif
147

Advertisement

Table of Contents
loading

This manual is also suitable for:

200-240 vac slb

Table of Contents