
Writing Technician Interface Scripts
1-10 114089 Rev. A
• To convert and format text, and save the result in a specified variable for later
use, use the
sprintf command.
• To evaluate a simple arithmetical or logical expression and assign the result to
a given variable, use the
let command.
The
let command evaluates an expression from left to right (default). You can
use parentheses to change the order of the evaluation.
• To write a list of command line arguments into a pseudo-variable array, use
the
arrayenv command.
You can append arguments to the end of an existing variable array with the
-a
option. If an argument contains spaces, place double quotes (“”) around it (for
example,
“enclose this one”).
• To assign a sequence of values to a list of variable names, use the
enumenv
command. You must indicate a starting number and optionally you can
specify a value by which to increment the values in the series. You can use the
sequence you have created as named indices of an array variable. Primarily,
you use this command with the
arrayenv command to index the values
created by that command.
Deleting Variables
To delete one or more variables from the local or global environment variable
table, use the
unsetenv command. For example, if you enter
unsetenv a
the system deletes variable a from the table.
You cannot delete a variable from the system environment variable table.
You can delete all variables that are part of a pseudo-variable array by using the
wildcard character *. For example, to delete all variables that begin with
array_,
enter the following command:
unsetenv array_*
For specific instructions on using the unsetenv command, see Chapter 2.
Commentaires sur ces manuels