User Manual

Command Reference Site Commands
12-139
string
The following special characters can be used in CHAT script expect strings,
which are case-sensitive.
Fail
Uses the number specified as the Timeout seconds parameter to set the number
of times the search for a string (specified with the Expect parameter) can fail
before the whole script will give up. Each time the Expect command fails, the
script continues at the last Fail command. This permits looping while waiting
for a given prompt.
A sample script is displayed below.
Local>> DEFINE SITE irvine CHAT TIMEOUT 4 FAIL
Local>> DEFINE SITE irvine CHAT SEND ““
Local>> DEFINE SITE irvine CHAT TIMEOUT 2 EXPECT “login:”
This script will send a newline and wait for the string login: for two seconds.
If found, the script will continue. If not, the script will search again three times
before failing.
Send
Sends the specified string, followed by a newline character (0xd hex, 13
ASCII). If a string is not specified, only a carriage return is sent.
Delete
Removes a line.
LineNum
The line to remove.
Defaults Timeout: 0 (None defined)
marker and string: not defined
Examples
Local>> CHAT REPLACE 1 EXPECT “login:”
Local>> CHAT DELETE 1
Local>> CHAT TIMEOUT 2 EXPECT “login:”
Local>> DEFINE SITE irvine CHAT SEND “hello?”
Local>> DEFINE SITE irvine CHAT REPLACE 4 TIMEOUT 3 EXPECT “login:”
See Also Show/Monitor/List Sites Chat, page 12-151; Chat Scripts, page 5-3
Table 12-6:
String Meaning String Meaning
\N (0x0 hex) Newline \b (0x8 hex) Backspace
\r (0xd hex) Return \n (0xda hex) Newline
\t (0x14 hex) Tab \\ (0x5c hex) \
\s (0x20 hex) Space \octal Octal value (i.e., \101 = A)