Path: utzoo!utgpu!watserv1!watmath!att!mcdchg!laidbak!ism.isc.com!uunet!know!sdd.hp.com!hplabs!hpda!hpcuhb!morrell From: morrell@hpcuhb.cup.hp.com (Michael Morrell) Newsgroups: comp.unix.shell Subject: Re: Implementing a Timeout During Shell Script Data Entry Message-ID: <38020001@hpcuhb.cup.hp.com> Date: 23 Oct 90 08:28:30 GMT References: <4128@kitty.UUCP> Organization: Hewlett Packard, Cupertino Lines: 19 /comp.unix.shell / larry@kitty.UUCP (Larry Lippman) / 9:35 pm Oct 20, 1990/ I would be interested in seeing any suggestions for implementing a timeout for lack of response to a "read" statement contained in a shell script running under Bourne shell. ---------- You might try using the probably undocumented timeout feature of line(1). I'm not sure which versions of Un*x have this "feature", but you could check. It's used as follows: echo "Prompt\c" [ or echo -n "Prompt" ] reply=`line -t 10` The line command will return after 10 seconds if no input has been detected. Hope this helps, Michael