Avaya Writing Technician Interface Scripts Manual de usuario Pagina 33

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 120
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 32
Command Reference
2-3
arrayenv
The arrayenv command allows you to write a list of command line arguments
<text_string>
to a pseudo-variable array, beginning with the prefix
<variable_name>
. You can also append arguments to the end of an existing
variable array using the
-a option.
The
arrayenv command has the following syntax:
arrayenv [-a] <
variable_name
>
<text_string>
[
<text_string>
. . .]
-a appends the new arguments to the end of a variable array.
<variable_name>
is the name of the variable that holds the array.
<text_string>
contains the command line arguments. If the text for the arguments
contains blanks or special characters, enclose it in double quotes (as shown in
syntax). For example, to pass the argument Router One, specify
“Router One” in
the statement.
The following example sets up an array named
attribute, specifies a series of
values for the array, appends a value to the list, and then prints the number of
elements in the array, the value of the first element and the value of the last
element. The size of the pseudo-variable array is stored at index 0.
arrayenv attribute one two “three & four” five “six & seven”
arrayenv -a attribute “Router One”
echo “Size: ${attribute[0]}”;
echo “First element: ${attribute[1]}”;
echo “Last element: ${attribute[${attribute[0]}]}”;
The output from this script is as follows:
Size: 6
First element: one
Last element: Router One
cutenv
The cutenv command allows you to select portions of a
<text_string>
(as
specified by
<list>
) and write them to a pseudo-variable array, beginning with the
prefix
<variable_name>
. The items specified by
<list>
can represent column
position or fields delimited by a special character. Column and field numbering
start at 1.
Vista de pagina 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 ... 119 120

Comentarios a estos manuales

Sin comentarios