Browsed by
Tag: terminal

[Bash] How to kill program after n seconds

[Bash] How to kill program after n seconds

I’m sorry that I haven’t written for such a long time. It’s going to change:) We have a program, which can suspend our terminal. We want to be sure, that program won’t be executed for more than n seconds. Here is a solution: ((sleep 10 && killall top)&); top((sleep 10 && killall top)&); top Explanation: sleep 10 is executed for 10 seconds and then exit (you can use sleep n if you want sleep to be executed for n seconds…

Read More Read More