3.3

Table Of Contents
Dialog Commands
171
To see what happens during just one part of a dialog, bracket that portion of the dialog with
diag on and diag off commands.
echo
echo [on | off]
Turns local echo on or off.
Turn on local echo in any dialog used to connect to a device or information service that does
not echo back what the user enters. This way, the user can see what he or she is entering.
To turn on local echo, place echo on in the dialog where you want local echo turned on. Use
this command at or near the beginning of the dialog.
While you can turn local echo off using the echo off command, you are not required to do so.
Local echo is turned off automatically when the dialog finishes.
escape
escape <escape character>
To change the escape character (used to bring up the cmd> prompt) from within a dialog, use
the escape command.
For instance, to change the escape character from the default Ctrl+] to Ctrl+Z, use the escape
command. Represent the Ctrl+Z character as <26> (its decimal value).
n
Do not change the escape character to Ctrl+A, Ctrl+Q, or Ctrl+S. These characters have
other important functions.
The escape character is reset to the default (Ctrl+]) when the user closes the connection.
expect
expect <delimiter><string1><delimiter><string2><delimiter>...
Instructs the dialog to wait for the device to which the service has connected to send a string
(string1). If that string is not received within five seconds, expect sends the second string
(string2) to the device and waits for a third string (string3). This continues until an expected
string is received within the five-second limit or expect runs out of strings.