[NTLUG:Discuss] Prompt / Response / Timeout in a script
Jack Snodgrass
jack at jacksnodgrass.com
Wed Sep 15 12:54:28 CDT 2004
I need a simple ( not perl or any other add-on language ) way to prompt
a user, take their input or continue on if a timeout period is reached.
I want to do something like:
Select 1, 2, or 3: [1]
and let the user select 1, 2 or 3 or after 'X' seconds
exit and pass the choice to the script it's running. I'd
then check the result from the program and decide what program
the user wants to select.
I need to put this in a #/bin/sh script and run it on a linux box
that doesn't have a lot of stuff ( like perl ) installed on it.
Is there a simple tool or shell trick that will let me do this?
If not, I'll see if I can write something in C that will do this...
I'd prefer to find something else if possible.
Thanks - jack
--
Jack Snodgrass <jack at jacksnodgrass.com>
More information about the Discuss
mailing list