mexpect man page on BSDOS

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDOS logo
[printable version]

MEXPECT(8)		  BSD System Manager's Manual		    MEXPECT(8)

NAME
     mexpect - send a string to a device/modem and expect a response

SYNOPSIS
     mexpect [-dsz] [-b baud] [-c count] [-f device] [-r rstring] [-t timeout]
     string [expect [...]]

DESCRIPTION
     The mexpect program sends string and optionally waits for one of several
     expect strings in response.  The expect strings are regular expressions
     as defined by regex(3).

     The optional arguments to mexpect are:

     -b	     Do not send characters any faster than would be sent if the line
	     was set to the baud rate baud. This allows leaving the line at
	     higher speeds when talking to a modem that can't keep up while in
	     command mode.

     -c count
	     Try sending string up to count times.

     -d	     Turn on debug mode.  This will cause mexpect to print out each
	     string sent and received from the device.

     -f device
	     Instead of assuming standard input and standard output, open
	     device and send all requests and expect all responses from it.
	     It is quite useful when device is of the form /dev/fd/xx.

     -r rstring
	     Before resending string after a timeout (as indicated by -c),
	     send rstring.

     -s	     Cause mexpect to print on exit, to standard output, two lines of
	     the form:

		   MINDEX='index'
		   MSTRING='match'

	     The value of index will either be the index (starting with 0) to
	     the expect string that was matched.  The value of match will be
	     the string that actually matched the expect string.  On error,
	     index will be set to -1 and match will indicate the error.

	     If there are no expect strings, then index will be 0 and match
	     will be empty.

     -t timeout
	     If no expect string is received within timeout seconds, either
	     resend string (see -c) or exit with a failure.

     -z	     Cause mexpect to expect string to be echoed.  Expect will wait
	     for string to be echoed before looking for one of the expect
	     strings.

     When there are no expect strings defined, mexpect does not wait for any
     response, including the echoing of string, even if -z is given.

SEE ALSO
     regex(3)

HISTORY
     This command first appeared in BSD/OS 3.0.

AUTHORS
     Paul Borman, Berkeley Software Design, Inc.

BSDI BSD/OS			March 6th, 1995				     2
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net