Chat in and chat out scripts
Chat in and chat out scripts control probe login and logout. These scripts are on a single line in the expect-send format (for chat in scripts) or send-expect format (for chat out scripts). You can specify chat in and chat out strings using the ChatinString and ChatoutString properties or the -chatinstring and -chatoutstring command line options.
The format is:
ChatinString : expect send expect send....
ChatoutString : send expect send expect....
A typical chat in script might be:
.*login.*:.* anu\r\n .*assword.*:.* anu\r\n
The expect text can use any regular expression, while the send text can send any characters, including control characters using the standard UNIX/C escape sequences described in Escape codes.