.TH WAITFOR 1 local .SH NAME waitfor \- wait for a string to appear on the stdin .SH SYNOPSIS .B waitfor [ .B \-n ] .B string .SH DESCRIPTION .I Waitfor reads the standard input and returns a 0 if the string argument is found, returns a 1 if the strings did not appear within the allotted time, or returns a \-1 on error. If the string is found, .I waitfor returns immediately. .PP .I Waitfor is designed to be used by .I Pcomm in a shell script for automatically logging a user onto a remote system. .PP The .I \-n option is used to specify the length of time in seconds to wait. The default is 10 seconds. .SH EXAMPLE .nf # wait 5 seconds for the login prompt waitfor \-5 login: # test the exit code of the waitfor command if [ $? \-eq 0 ] then # send my user ID echo egray fi .fi .SH "SEE ALSO" pcomm(1), matches(1), modem_break(1), Pcomm Reference Manual