Avaya Writing Technician Interface Scripts Manuel d'utilisateur Page 33

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 116
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 32
Command Reference
308660-14.00 Rev 00
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.
Syntax
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.
Example
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
Vue de la page 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 ... 115 116

Commentaires sur ces manuels

Pas de commentaire