The tag has no wiki summary.

learn more… | top users | synonyms

33
votes
5answers
6k views

Timing out in a shell script

I have a shell script that's reading from standard input. In rare circumstances, there will be no one ready to provide input, and the script must time out. In case of timeout, the script must execute ...
18
votes
1answer
2k views

Run a command for a specified time and then abort if time exceeds

I want know how I can run a command for a specified time say, one minute and if it doesn't complete execution then I should be able to stop it.
17
votes
4answers
20k views

How to introduce timeout for shell scripting?

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 ...
6
votes
1answer
1k views

How to mount a Truecrypt container with a timeout from the command line?

I'm mounting a truecrypt container via the command line (i.e. truecrypt file dir). Is there any way to have truecrypt automatically unmount the container after a given amount of inactivity in dir?