Implementing a Timeout During Shell Script Data Entry
Dan_Jacobson at ATT.COM
Dan_Jacobson at ATT.COM
Wed Oct 24 09:53:47 AEST 1990
>>>>> On 22 Oct 90 14:51:29 GMT, bernie at DIALix.oz.au (Bernd Felsche) said:
Bernd> The following seems to work for me:
[...]
Well, I just stuck this in the middle of my .profile this morning...
seems to work:
test -n "$program" &&
sec=8 &&
trap 'trap 2' 2 &&
echo "you got $sec seconds to interrupt before
\"$program\"... \c" &&
sleep $sec &&
trap 2 &&
eval $program
Bernd> Hope that does the trick.
I hope so too... even though there might be tiny intervals where an
interrupt would spoil the fun.
--
Dan_Jacobson at ATT.COM Naperville IL USA +1 708-979-6364
More information about the Comp.unix.shell
mailing list