I am writing a #!/bin/sh script on SunOS5.8. I want to read keyboard input and if the input timesout, I want to default to something else. I have looked in forums and found quite a few techniques none of which seem to work for me... MY script looks something like this (there is no IF condition right now):
#!/bin/sh
echo Please Input Number of Days of History to Retain:;
read days;
echo $days;
exit
I have tried TMOUT, TIMELIMIT, etc. They simply dont seem to have any effect and the program continue to wait for my input forever. I want to set it to timeout after 10 secs.
Thanks for any help and apologies for those that have seen this Q a million times. I just couldnt find the answer...
#!/bin/sh
echo Please Input Number of Days of History to Retain:;
read days;
echo $days;
exit
I have tried TMOUT, TIMELIMIT, etc. They simply dont seem to have any effect and the program continue to wait for my input forever. I want to set it to timeout after 10 secs.
Thanks for any help and apologies for those that have seen this Q a million times. I just couldnt find the answer...