home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
InfoMagic Source Code 1993 July
/
THE_SOURCE_CODE_CD_ROM.iso
/
languages
/
tcl
/
expect
/
expect-4.7
/
example
/
timed-read
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1993-04-12
|
236 b
|
7 lines
#!../expect -f
# read a complete line from stdin (minus terminating newline)
# aborting after the number of seconds (given as an argument)
# - Don Libes
set timeout [lindex $argv 1]
expect -re "(.*)\n" {send_user $expect_out(1,string)}