I want to run a shell script that got a loop in it and it can go for ever which I do not want to happen. So I need to introduce a timeout for the whole script.
How can I introduce a timeout for the whole shell script under SuSE?
shell-scripttimeout
I want to run a shell script that got a loop in it and it can go for ever which I do not want to happen. So I need to introduce a timeout for the whole script.
How can I introduce a timeout for the whole shell script under SuSE?
Best Answer
If GNU
timeout
is not available you can useexpect
(Mac OS X, BSD, ... do not usually have GNU tools and utilities by default).Edit Example: