Bash Script: Kill a process after fixed time.
I want to execute a program using a shell script, but if the program does not terminates after a certain amount of time (lets say 5 m), I want to kill it in order to execute the same program again (my program sometimes terminates before 5 min). When the program terminates I want to save its results. So, my newbie shell script is the following...
for (( i = 1; i <= 100; i++ ))
mv result.txt /home/bruno/output_I/result_00$0.txt