Read the chat script from the chat \fIfile\fR. The use of this option
is mutually exclusive with the chat script parameters. The user must
have read access to the file. Multiple lines are permitted in the
file. Space or horizontal tab characters should be used to separate
the strings.
.TP
Read the chat script from the chat \fIfile\fR. The use of this option
is mutually exclusive with the chat script parameters. The user must
have read access to the file. Multiple lines are permitted in the
file. Space or horizontal tab characters should be used to separate
the strings.
.TP
Set the timeout for the expected string to be received. If the string
is not received within the time limit then the reply string is not
sent. An alternate reply may be sent or the script will fail if there
is no alternate reply string. A failed script will cause the
\fIchat\fR program to terminate with a non-zero error code.
.TP
Set the timeout for the expected string to be received. If the string
is not received within the time limit then the reply string is not
sent. An alternate reply may be sent or the script will fail if there
is no alternate reply string. A failed script will cause the
\fIchat\fR program to terminate with a non-zero error code.
.TP
Set the file for output of the report strings. If you use the keyword
\fIREPORT\fR, the resulting strings are written to this file. If this
option is not used and you still use \fIREPORT\fR keywords, the
\fIstderr\fR file is used for the report strings.
.TP
Set the file for output of the report strings. If you use the keyword
\fIREPORT\fR, the resulting strings are written to this file. If this
option is not used and you still use \fIREPORT\fR keywords, the
\fIstderr\fR file is used for the report strings.
.TP
Start with the echo option turned on. Echoing may also be turned on
or off at specific points in the chat script by using the \fIECHO\fR
keyword. When echoing is enabled, all output from the modem is echoed
to \fIstderr\fR.
.TP
Start with the echo option turned on. Echoing may also be turned on
or off at specific points in the chat script by using the \fIECHO\fR
keyword. When echoing is enabled, all output from the modem is echoed
to \fIstderr\fR.
.TP
Request that the \fIchat\fR script be executed in a verbose mode. The
\fIchat\fR program will then log the execution state of the chat
script as well as all text received from the modem and the output
strings sent to the modem. The default is to log through the SYSLOG;
Request that the \fIchat\fR script be executed in a verbose mode. The
\fIchat\fR program will then log the execution state of the chat
script as well as all text received from the modem and the output
strings sent to the modem. The default is to log through the SYSLOG;
Request that the \fIchat\fR script be executed in a stderr verbose
mode. The \fIchat\fR program will then log all text received from the
modem and the output strings sent to the modem to the stderr device. This
device is usually the local console at the station running the chat or
pppd program.
.TP
Request that the \fIchat\fR script be executed in a stderr verbose
mode. The \fIchat\fR program will then log all text received from the
modem and the output strings sent to the modem to the stderr device. This
device is usually the local console at the station running the chat or
pppd program.
.TP
Pass in an arbitary string, usually a phone number, that will be
substituted for the \\T substitution metacharacter in a send string.
.TP
Pass in an arbitary string, usually a phone number, that will be
substituted for the \\T substitution metacharacter in a send string.
.TP
Pass in a second string, usually a phone number, that will be
substituted for the \\U substitution metacharacter in a send string.
This is useful when dialing an ISDN terminal adapter that requires two
numbers.
.TP
.B script
Pass in a second string, usually a phone number, that will be
substituted for the \\U substitution metacharacter in a send string.
This is useful when dialing an ISDN terminal adapter that requires two
numbers.
.TP
.B script
the script is included as parameters to the \fIchat\fR program.
.SH CHAT SCRIPT
.LP
The \fIchat\fR script defines the communications.
.LP
the script is included as parameters to the \fIchat\fR program.
.SH CHAT SCRIPT
.LP
The \fIchat\fR script defines the communications.
.LP
-A script consists of one or more "expect-send" pairs of strings,
-separated by spaces, with an optional "subexpect-subsend" string pair,
+A script consists of one or more "expect\-send" pairs of strings,
+separated by spaces, with an optional "subexpect\-subsend" string pair,
.LP
This line indicates that the \fIchat\fR program should expect the string
"ogin:". If it fails to receive a login prompt within the time interval
.LP
This line indicates that the \fIchat\fR program should expect the string
"ogin:". If it fails to receive a login prompt within the time interval
should include sub-expect sequences should the original string not be
received. For example, consider the following script:
.IP
should include sub-expect sequences should the original string not be
received. For example, consider the following script:
.IP
.LP
This would be a better script than the simple one used earlier. This would look
for the same login: prompt, however, if one was not received, a single
.LP
This would be a better script than the simple one used earlier. This would look
for the same login: prompt, however, if one was not received, a single
at the terminal via standard error. If \fBchat\fR is being run by
pppd, and pppd is running as a daemon (detached from its controlling
terminal), standard error will normally be redirected to the file
at the terminal via standard error. If \fBchat\fR is being run by
pppd, and pppd is running as a daemon (detached from its controlling
terminal), standard error will normally be redirected to the file
.LP
\fBSAY\fR strings must be enclosed in single or double quotes. If
carriage return and line feed are needed in the string to be output,
.LP
\fBSAY\fR strings must be enclosed in single or double quotes. If
carriage return and line feed are needed in the string to be output,
ATDT5551212 to dial the telephone. The expected string is
\fICONNECT\fR. If the string \fICONNECT\fR is received the remainder
of the script is executed. In addition the program will write to the
ATDT5551212 to dial the telephone. The expected string is
\fICONNECT\fR. If the string \fICONNECT\fR is received the remainder
of the script is executed. In addition the program will write to the
entries so that new strings can use that space.
.SH ECHO
The echo options controls whether the output from the modem is echoed
entries so that new strings can use that space.
.SH ECHO
The echo options controls whether the output from the modem is echoed
-to \fIstderr\fR. This option may be set with the \fI-e\fR option, but
-it can also be controlled by the \fIECHO\fR keyword. The "expect-send"
+to \fIstderr\fR. This option may be set with the \fI\-e\fR option, but
+it can also be controlled by the \fIECHO\fR keyword. The "expect\-send"
pair \fIECHO\fR \fION\fR enables echoing, and \fIECHO\fR \fIOFF\fR
disables it. With this keyword you can select which parts of the
conversation should be visible. For instance, with the following
pair \fIECHO\fR \fION\fR enables echoing, and \fIECHO\fR \fIOFF\fR
disables it. With this keyword you can select which parts of the
conversation should be visible. For instance, with the following
.LP
This will change the timeout to 10 seconds when it expects the login:
prompt. The timeout is then changed to 5 seconds when it looks for the
.LP
This will change the timeout to 10 seconds when it expects the login:
prompt. The timeout is then changed to 5 seconds when it looks for the
For example, the character DC1 (17) is shown as \^^Q.
.I (some characters are not valid in expect.)
.SH ENVIRONMENT VARIABLES
For example, the character DC1 (17) is shown as \^^Q.
.I (some characters are not valid in expect.)
.SH ENVIRONMENT VARIABLES
option was specified in the command line. The metacharacter \fI$\fR is used
to introduce the name of the environment variable to substitute. If the
substition fails, because the requested environment variable is not set,
option was specified in the command line. The metacharacter \fI$\fR is used
to introduce the name of the environment variable to substitute. If the
substition fails, because the requested environment variable is not set,
script correctly for the condition or that some unexpected event has
occurred and the expected string could not be found.
.TP
script correctly for the condition or that some unexpected event has
occurred and the expected string could not be found.
.TP