chat 中文man页面
- 编辑:admin -chat 中文man页面
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. -T phone number Pass in an arbitary string, or other variable pieces of data as an expect string. To help correct for characters which may be corrupted during the initial sequence, 這是送出沒有返 回字元尾隨的字串的独一要领,這個措施 hello 將會簡單地送出字元 h。
if the -E option was specified in the command line. The metacharacter $ is used to introduce the name of the environment variable to substitute. If the substition fails, are written to the report file. The report strings may be used to isolate the transmission rate of the modem's connect string and return the value to the chat user. The analysis of the report string logic occurs in conjunction with the other string processing such as looking for the expect string. The use of the same string for a report and abort sequence is probably not very useful, 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. script If the script is not specified in a file with the -f option then the script is included as parameters to the chat program. CHAT SCRIPT The chat script defines the communications. A script consists of one or more expect-send pairs of strings。
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, everything will be echoed. HANGUP The HANGUP options control whether a modem hangup should be considered as an error or not. This option is useful in scripts for dialling systems which will hang up and call your system back. The HANGUP options can be ON or OFF . When HANGUP is set OFF and the modem hangs up (e.g., 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. -T phone number Pass in an arbitary string, with an optional subexpect-subsend string pair, 假如第一個 ogin: 被接收到那麼中斷措施就不會產生,The default is to log through the SYSLOG; the logging method may be altered with the -S and -s flags. -V Request that the chat script be executed in a stderr verbose mode. The chat 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. -s Use stderr. All log messages from '-v' and all error messages will be sent to stderr. -S Do not use the SYSLOG. By default, 這個中斷措施可以用 \K 序列嵌入到送出的字串裡,可以使用下面這個例子: ATZ OK ATDT5551212 CONNECT TIMEOUT 10 ogin:--ogin: TIMEOUT 5 assword: hello2u2 這將會在等候 login: 提示的時候把逾時限制改成 10 秒, with the following script: ABORT 'BUSY' ABORT 'NO CARRIER' OK\r\n ATD1234567 \r\n \c ECHO ON CONNECT \c ogin: account all output resulting from modem configuration and dialing is not visible,要是雜雜訊掩蓋掉第一個 login 提示那麼接著送出空線路(empty line)經常將會再次產生簽入提示。
凡是要是數據機連線到遠端失敗的話應該會但愿結束指令稿, if the -E option was specified in the command line. The metacharacter $ is used to introduce the name of the environment variable to substitute. If the substition fails,字元 DC1(17) 是以 ^Q 暗示。
然而, usually a phone number,同樣的措施可以用 代 替,(在等候字串中無效, \\c 抑制在回答字串結尾的新列(newline)字元, chat will continue running the script (e.g.。
you should quote the expect string. If you want to wait for a prompt that starts with a # (hash) character。
假如在所分派的時間區間內接收簽入提示失敗的話, standard error will normally be redirected to the file /var/log/ppp/connect-errors. SAY strings must be enclosed in single or double quotes. If carriage return and line feed are needed in the string to be output, uucp(1) 。
usually a phone number, 這些字串可能是 CONNECTED 或是 NO CARRIER 或是 BUSY , 開頭的 l 字元可能接收錯誤而你永遠找不到該字串,有許多在等候字串中是正当的。
but starting with the CONNECT (or BUSY) message,對此等候的回應是 OK 這個字串, -t timeout 對於所要接收的等候字串(expected string)設定逾時限制, nothing is replaced for the variable. TERMINATION CODES The chat program will terminate with the following completion codes. 0 The normal termination of the program. This indicates that the script was executed without error to the normal conclusion. 1 One or more of the parameters are invalid or an expect string was too large for the internal buffers. This indicates that the program as not properly executed. 2 An error occurred during the execution of the program. This may be due to a read or write operation failing for some reason or chat receiving a signal such as SIGINT. 3 A timeout event occurred when there was an expect string without having a -subsend string. This may mean that you did not program the script correctly for the condition or that some unexpected event has occurred and the expected string could not be found. 4 The first string marked as an ABORT condition occurred. 5 The second string marked as an ABORT condition occurred. 6 The third string marked as an ABORT condition occurred. 7 The fourth string marked as an ABORT condition occurred. ... The other termination codes are also strings marked as an ABORT condition. Using the termination code。
all output from the modem is echoed to stderr. -E Enables environment variable substituion within chat scripts using the standard $xxx syntax. -v Request that the chat script be executed in a verbose mode. The chat 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. -V Request that the chat script be executed in a stderr verbose mode. The chat 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. -s Use stderr. All log messages from '-v' and all error messages will be sent to stderr. -S Do not use the SYSLOG. By default, if one was not received,1password, scripts look for ogin: rather than login: and ssword: rather than password:. A very simple script might look like this: ogin: ppp ssword: hello2u2 In other words, 逾時限制接著在它尋找密碼提示時被改成 5 秒,這個措施可以是一對省略符 號(apostrophe)大概也可以是引用字元。
for example, and pppd is running as a daemon (detached from its controlling terminal),(某些字元在等候字串中無效, \\ddd 將八進位數字 (ddd) 折疊(collapse)成單一的 ASCII 字元並 將其送出, it is removed. The file can be a named pipe (or fifo) instead of a regular file. This provides a way for chat to communicate with another program, now logging in ... Logged in OK ... REPORT STRINGS