]> git.ozlabs.org Git - ppp.git/blobdiff - chat/chat.8
add handle_events() function
[ppp.git] / chat / chat.8
index 55c9c933d1a7b4c1e896dbb7cb27371e4d07a307..8c031f5012aee56b180aae5c4e26440f83751b36 100644 (file)
@@ -1,12 +1,12 @@
 .\" -*- nroff -*-
 .\" manual page [] for chat 1.8
-.\" $Id: chat.8,v 1.5 1997/07/14 03:49:41 paulus Exp $
+.\" $Id: chat.8,v 1.9 1999/09/06 05:10:23 paulus Exp $
 .\" SH section heading
 .\" SS subsection heading
 .\" LP paragraph
 .\" IP indented paragraph
 .\" TP hanging label
-.TH CHAT 8 "5 May 1995" "Chat Version 1.9"
+.TH CHAT 8 "22 May 1999" "Chat Version 1.22"
 .SH NAME
 chat \- Automated conversational script with a modem
 .SH SYNOPSIS
@@ -49,20 +49,42 @@ 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
+.B -E
+Enables environment variable substituion within chat scripts using the
+standard \fI$xxx\fR syntax.
+.TP
 .B -v
 Request that the \fIchat\fR script be executed in a verbose mode. The
-\fIchat\fR program will then log all text received from the modem and
-the output strings which it sends to the SYSLOG.
+\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;
+the logging method may be altered with the -S and -s flags.
 .TP
 .B -V
 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 which it sends to the stderr device. This
+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. This option will not work properly if the stderr is
-redirected to the /dev/null location as is the case should pppd be run
-in the 'detached' mode. In that case, use the '-v' option to record
-the session on the SYSLOG device.
+pppd program.
+.TP
+.B -s
+Use stderr.  All log messages from '-v' and all error messages will be
+sent to stderr.
+.TP
+.B -S
+Do not use the SYSLOG.  By default, error messages are sent to the
+SYSLOG.  The use of -S will prevent both log messages from '-v' and
+error messages from being sent to the SYSLOG.
+.TP
+.B -T \fI<phone number>
+Pass in an arbitary string, usually a phone number, that will be
+substituted for the \\T substitution metacharacter in a send string.
+.TP
+.B -U \fI<phone number 2>
+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
 If the script is not specified in a file with the \fI-f\fR option then
@@ -135,6 +157,16 @@ character, you would have to write something like this:
 \'# ' logout
 .LP
 
+.SH SENDING DATA FROM A FILE
+If the string to send starts with an at sign (@), the rest of the
+string is taken to be the name of a file to read to get the string to
+send.  If the last character of the data read is a newline, it is
+removed.  The file can be a named pipe (or fifo) instead of a regular
+file.  This provides a way for \fBchat\fR to communicate with another
+program, for example, a program to prompt the user and receive a
+password typed in.
+.LP
+
 .SH ABORT STRINGS
 Many modems will report the status of the call as a string. These
 strings may be \fBCONNECTED\fR or \fBNO CARRIER\fR or \fBBUSY\fR. It
@@ -401,6 +433,14 @@ sequence 'HI TIM' and HI\\sTIM are the same.
 .B \\\\t
 Send or expect a tab character.
 .TP
+.B \\\\T
+Send the phone number string as specified with the \fI-T\fR option
+.I (not valid in expect.)
+.TP
+.B \\\\U
+Send the phone number 2 string as specified with the \fI-U\fR option
+.I (not valid in expect.)
+.TP
 .B \\\\\\\\
 Send or expect a backslash character.
 .TP
@@ -413,6 +453,12 @@ character.
 Substitute the sequence with the control character represented by C.
 For example, the character DC1 (17) is shown as \^^Q.
 .I (some characters are not valid in expect.)
+.SH ENVIRONMENT VARIABLES
+Environment variables are available within chat scripts, if  the \fI-E\fR
+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,
+\fInothing\fR is replaced for the variable.
 .SH TERMINATION CODES
 The \fIchat\fR program will terminate with the following completion
 codes.