Реферат: Networking Principles Essay Research Paper DialUp Scripting
decisions based upon the value of this variable.
$FAILURE Boolean This variable is set by certain commands to indicate
whether or not the command failed. A script can make decisions
based upon the value of this variable.
These variables may be used wherever an expression of a similar type is used. For example,
transmit $USERID
is a valid command because $USERID is a variable of type string.
4.0 String Literals
Scripting for Dial-Up Networking supports escape sequences and caret translations, as described below.
String Literal Description
^char Caret translation
If char is a value between ‘@’ and ‘_’, the character sequence is translated into a single-byte value between 0 and 31. For example, ^M is converted to a carriage return.
If char is a value between a and z, the character sequence is translated into a single-byte value between 1 and 26.
If char is any other value, the character sequence is not specially treated.
*cr* Carriage return
*lf* Linefeed
\” Double-quote
\^ Single caret
\* Single ‘*’
\\ Backslash
Examples:
transmit “^M”
transmit “Joe^M”
transmit “*cr**lf*”
waitfor “*cr**lf*”
5.0 Expressions
An expression is a combination of operators and arguments that evaluates to a result. Expressions can be used as values in any command.
An expression can combine any variable, or integer, string, or boolean values with any of the unary and binary operators in the following tables. All unary operators take the highest precedence. The precedence of binary operators is indicated by their position in the table.
The unary operators are: