WAITFOR(1)

NAME
waitfor - wait for a string to appear on the stdin

SYNOPSIS
waitfor [ -n ] string

DESCRIPTION
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, waitfor returns immediately.

Waitfor is designed to be used by Pcomm in a shell script for automatically logging a user onto a remote system.

The -n option is used to specify the length of time in seconds to wait. The default is 10 seconds.

EXAMPLE
	# 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

SEE ALSO
pcomm(1), matches(1), modem_break(1), Pcomm Reference Manual