|
|
Index | Description | Usage | Options | Variables | Hints | Bulletproof
| send
[-flags] string |
send to remote process |
| send_error
[-flags] string |
send
to stderr |
| send_log
[--] string |
send
to log file (see log_file.) |
| send_tty
[-flags] string |
send
to /dev/tty |
| send_user
[-flags] string |
send
to stdout |
| Flags |
Significance |
| — |
forces
the next argument to be interpreted as a string rather than a flag.
Any string can be preceded by “—“ whether or not it actually looks like
a flag. This provides a reliable mechanism to specify variable strings
without being tripped up by those that accidentally look like flags.
(All strings starting with “-“ are reserved for future options.) |
| -i spawn_id |
The
-i flag declares that the string be sent to the named spawn_id. If
the spawn_id is user_spawn_id, and the terminal is in raw mode, newlines
in the string are translated to return-newline sequences so that they appear
as it the terminal was in cooked mode. The -raw flag disables this
translation. |
| -null
number |
The
-null flag sends null characters (0 bytes). By default, one null
is sent. An integer may follow the -null to indicate how many nulls
to send. |
| -break |
The
-break flag generates a break condition. This only makes sense if
the spawn id refers to a tty device opened via “spawn
-open”. If you have spawned a process such as tip, you should use
tip’s convention for generating a break. |
-s
(uses
send_slow) |
The
-s flag forces output to be sent “slowly”, thus avoid the common situation
where a computer outtypes an input buffer that was designed for a human
who would never outtype the same buffer. This output is controlled
by the value of the variable “send_slow” which
takes a two element list. |
-h
(uses
send_human) |
The
-h flag forces output to be sent (somewhat) like a human actually typing.
Human-like delays appear between the characters. (The algorithm is
based upon a Weibull distribution, with modifications to suit this particular
application.) This output is controlled by the value of the variable “send_human”
which takes a five element list. |
This material
is excerpted from the O'Reilly book "Exploring Expect" by Don Libes, and
can also be found in the manpage on many UNIX platforms.
|
|
|
|
 |

|
 |
|
Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
| |
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
| |
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
| |
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
| |
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!
|
|
Service Details
|
|
 |
|