Implementing a Timeout During Shell Script Data Entry

Ed McGuire emcguire at ccad.uiowa.edu
Thu Oct 25 02:20:12 AEST 1990


In article <38020001 at hpcuhb.cup.hp.com> morrell at hpcuhb.cup.hp.com (Michael Morrell) writes:

> 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.

What version if UNIX are you running?  No machine at my site will do it.

	Alliant Concentrix 5.5 (BSD43)		no line(1)
	Apollo Domain/OS SR10.1/BSD43		no line(1)
	Digital ULTRIX 3.1			ignores -t
	Intergraph CLIX 3.0.8 (SYSVR31)		ignores -t
	S.G. IRIX (SYSVR3)			ignores -t
	Stardent OS 2.2 (SYSVR30)		ignores -t
	Sun SunOS (BSD43)			ignores -t
-- 
peace.  -- Ed
"Vote.  Because it's the Right Thing."



More information about the Comp.unix.shell mailing list