]> git.ozlabs.org Git - ppp.git/blobdiff - chat/chat.8
Fixed some minor syntax errors.
[ppp.git] / chat / chat.8
index 2612d67ff775aa7218a19ee40123f3c2adcc5ee1..8d1a78480cc5be2462dbe633f5478b619c08708b 100644 (file)
@@ -1,12 +1,12 @@
 .\" -*- nroff -*-
 .\" manual page [] for chat 1.8
-.\" $Id: chat.8,v 1.7 1998/02/04 01:35:49 paulus Exp $
+.\" $Id: chat.8,v 1.10 2002/01/11 18:02:45 etbe Exp $
 .\" SH section heading
 .\" SS subsection heading
 .\" LP paragraph
 .\" IP indented paragraph
 .\" TP hanging label
-.TH CHAT 8 "27 Sep 1997" "Chat Version 1.17"
+.TH CHAT 8 "22 May 1999" "Chat Version 1.22"
 .SH NAME
 chat \- Automated conversational script with a modem
 .SH SYNOPSIS
@@ -49,6 +49,10 @@ 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 the execution state of the chat
@@ -150,7 +154,17 @@ character, you would have to write something like this:
 .IP
 # Now wait for the prompt and send logout string
 .br
-\'# ' logout
+\&'# ' 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
@@ -202,7 +216,7 @@ ECHO OFF
 .br
 SAY "Dialling your ISP...\\n" 
 .br
-\'' ATDT5551212 
+\&'' ATDT5551212 
 .br
 TIMEOUT 120
 .br
@@ -312,13 +326,13 @@ OK\\r\\n  ATD1234567
 .br
 CONNECT \\c
 .br
-\'Callback login:' call_back_ID
+\&'Callback login:' call_back_ID
 .br
 HANGUP OFF
 .br
 ABORT "Bad Login"
 .br
-\'Callback Password:' Call_back_password
+\&'Callback Password:' Call_back_password
 .br
 TIMEOUT 120
 .br
@@ -419,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
@@ -431,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.