Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   chat    ( 8 )

автоматизированный разговорный скрипт с модемом (Automated conversational script with a modem)

ESCAPE SEQUENCES

The expect and reply strings may contain escape sequences. All of
       the sequences are legal in the reply string. Many are legal in
       the expect.  Those which are not valid in the expect sequence are
       so indicated.

'' Expects or sends a null string. If you send a null string then it will still send the return character. This sequence may either be a pair of apostrophe or quote characters.

\b represents a backspace character.

\c Suppresses the newline at the end of the reply string. This is the only method to send a string without a trailing return character. It must be at the end of the send string. For example, the sequence hello\c will simply send the characters h, e, l, l, o. (not valid in expect.)

\d Delay for one second. The program uses sleep(1) which will delay to a maximum of one second. (not valid in expect.)

\K Insert a BREAK (not valid in expect.)

\n Send a newline or linefeed character.

\N Send a null character. The same sequence may be represented by \0. (not valid in expect.)

\p Pause for a fraction of a second. The delay is 1/10th of a second. (not valid in expect.)

\q Suppress writing the string to the SYSLOG file. The string ?????? is written to the log in its place. (not valid in expect.)

\r Send or expect a carriage return.

\s Represents a space character in the string. This may be used when it is not desirable to quote the strings which contains spaces. The sequence 'HI TIM' and HI\sTIM are the same.

\t Send or expect a tab character.

\T Send the phone number string as specified with the -T option (not valid in expect.)

\U Send the phone number 2 string as specified with the -U option (not valid in expect.)

\\ Send or expect a backslash character.

\ddd Collapse the octal digits (ddd) into a single ASCII character and send that character. (some characters are not valid in expect.)

^C Substitute the sequence with the control character represented by C. For example, the character DC1 (17) is shown as ^Q. (some characters are not valid in expect.)