[SunHELP] Scripting Question,

sunhelp at sunhelp.org sunhelp at sunhelp.org
Fri Mar 23 04:18:10 CST 2001


On Thu, Mar 22, 2001 at 11:04:21AM -0500, Naser Ali wrote:
> I have a shell script which in one stage o its run sleeps for defined time
> period (which is hard coded).
> I want the script to sleep and continue after the sleep time, but if a key
> on the key board is pressed it should come out of the sleep and continue
> before it completes the sleep cycle.

Sounds like a job for Expect.
http://expect.nist.gov/

Something like this example would work!
http://expect.nist.gov/scripts/timed-choice

Well worth taking a look at Expect, it's very cool.

-- 
Brian Scanlan, Systems Administrator.
Irish Times New Media - http://www.ireland.com



More information about the SunHELP mailing list