Command Reference Guide
3Com Router 5000 Family and Router 6000 Family script-string ● 41
Command Reference
to the Modem and expect to receive receive-string1. If the string matching
receive-string1 is received before timeout, the execution of the subsequent
script, which will be otherwise terminated, will continue.
■ If the last string is a sending string, it indicates that the execution of the script will
be terminated after the string is sent without waiting for any receiving string.
■ If the beginning of the script needs no sending string, but need to wait for
receiving string directly, the first string can be set as “”, the meaning of which will
be explained later.
■ Except for ending with \c, the sending string will be automatically added with a
return to its end whenever it is sent.
■ A receiving string is matched via the location-independent matching method. That
is, a match is considered successful as long as the received contents contain the
expected string.
■ Concerning the match of receiving string, there can be multiple expected receiving
strings. The match operation on a receiving string will be considered successful if
the receiving string is matched with any expected receiving strings which are
separated by hyphens (“-“).
■ The default timeout time waiting for a receiving string is 5 seconds. TIMEOUT
seconds can be inserted into the script to adjust the timeout time waiting for
the receiving string, which is valid till a new TIMEOUT is set in the same script. For
its meanings, refer to the following table.
■ All the strings and keywords in a script are case-sensitive.
■ Both strings and keywords are separated by spaces. If a space is contained in a
string, it should be put in the double quotation marks (" "). A pair of empty
quotation marks (that is, "") has two possible meanings. Being a leading "" in a
script, it means that no string needs to be sent and the system will directly wait for
the receiving string. If "" is put at any other locations, the string content will be
regarded to be "".
■ ABORT receive-string can be inserted anywhere in a script to change the
script execution flow. Its presence in the script indicates that the script execution
will be terminated if a received string is fully matched to the
receive-string
set by ABORT receive-string. Multiple ABORT entries can be defined in a
script, and they will take effect concurrently. Once a received string matches any of
them, the script execution will be terminated. Regardless of where the ABORT
receive-string is placed, it will take effect in the whole script execution
process.
■ Escape characters can be inserted in a script for the purpose of better controlling
the script and increasing its flexibility. In addition, all the escape characters are the
delimiters in the string at the same time. Refer to the following table for details.
Table 2 Script keywords
Keyword Description
ABORT receive-string The string following ABORT will be compared with the string sent
from a Modem or a remote DTE device for a full match. Multiple
ABORT entries can be configured for a script, and all of them take
effect in the whole script execution period.
TIMEOUT seconds The digit following TIMEOUT is used to set the timeout interval that
the device waits for receiving strings. If no expected strings are
received within the interval, the execution of the script will be failed.
Once being set, the setting will be valid till a new TIMEOUT is set.