Lantronix EMG 8500 EMG User Guide - Page 258
Primary Commands, Table 12-5
View all Lantronix EMG 8500 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 258 highlights
12: Scripts 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 ('{') Command set unset scan sleep exec send, send_user Table 12-5 Primary Commands Description The set command assigns a value to a variable. Syntax: set where is a word, and 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 This command removes the definition of a variable within a script. Syntax: unset where is a word. The scan command is analogous to the C language scanf(). Syntax: scan ... where a variable reference, and is a quoted string. Each of the elements will be a word. The sleep command suspends execution of the script (puts it to 'sleep') for the specified number of seconds. Syntax: sleep where can be a word, a quoted string or a variable reference. The exec command executes a single CLI command. Currently only CLI 'show' commands may be executed via exec. Syntax: exec 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 send_user where can be either a quoted string or a variable reference. EMG™ Edge Management Gateway User Guide 258