3.3

Table Of Contents
172
To use the expect command, follow it with the character—that is,
<delimiter>
—you want
to use as the delimiter to separate each string in the list. The delimiter can be any character.
Follow this with the first string you want expect to wait for. Then add a delimiter and the
string you want expect to send if it does not receive the first string. You can add as many
strings as you want.
For instance, some devices may not display a
login:
prompt unless you press Enter. To
have the dialog send a carriage return to the device if it does not receive the
login:
prompt
immediately, use the expect command. If the first character following expect is a comma,
this sets the comma as the delimiter used to separate strings following the command from
each other.
If you do not place a string between two delimiters, this indicates a null string. If you have
the expect command wait for a null string, it considers any string it receives to be a match. If
you have the expect send a null string, it does not send anything, but instead waits for the
next expected string.
Although the dialog is suspended while this command is in effect, the user can employ the
quit connect command to close the connection.
heol
heol [on|off]
If necessary, you can have the system insert a hard end-of-line character (HEOL) after each
line of captured text.
Put the heol on command in the dialog at the point where you want this feature turned on.
To turn off this feature, use heol off.
If you are calling a device that contains information in tables or columns, have the system
insert an HEOL at the end of each captured line. This way, tables and columns you capture
retain their format. Put the heol on command in the dialog.
map
map <local character> <remote character>
Translates a character (local character) entered at the keyboard to some other character
(remote character) before sending it to the device to which you are connected. Likewise, if
the system receives a remote character from the device, the map command translates it to
local character before sending it to a workstation.