Avaya Writing Technician Interface Scripts Manual de usuario Pagina 43

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 116
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 42
Command Reference
308660-14.00 Rev 00
2-13
<string1>
<string2>
are ASCII character strings or numbers.
<operand>
is one of the following comparison operations:
(=) equal (!=) not equal
(>) greater than (>=) greater than or equal
(<) less than (<=) less than or equal
then is an optional word used for ease of reading.
<command>
is a Technician Interface command.
If both
<string1>
and
<string2>
are numbers, the test expression for the if
command is a numeric comparison. If
<string1>
and
<string2>
are not numbers, a
case-sensitive string comparison is done. You specify a case-insensitive
comparison using the
-ic argument.
The syntax for certain data types may also be tested using the
-u, -num, -ip,
or
-ipx argument. If the test on
<string1>
is valid, a 1 is substituted for
<string1>
.
If the test on
<string1>
is invalid, a 0 is substituted for
<string1>
.
Example 1
The following example shows a script using the if command. The comments
explain what is happening in the script.
setenv A “YES”
setenv B 1993
#string comparison
if “$A” = “YES” then ; echo TRUE ; date
#numeric comparison
if “$B” != “2001” then ; echo FALSE ; date
#test for valid IP address syntax
if -ip 192.88.22.33 = 1 then ; echo TRUE
#case-insensitive string comparison
if -ic “ABC” = “abc” then ; echo TRUE
#test for valid date, time, and timezone offset syntax
if -date “10/10/94” = 1 then; echo “Good”
if -time “10:10:44” = 1 then; echo “Good”
if -tz “-5.00” = 1 then; echo “Good”
Vista de pagina 42
1 2 ... 38 39 40 41 42 43 44 45 46 47 48 ... 115 116

Comentarios a estos manuales

Sin comentarios