I have to run a jar file with different parameters like this:
#!/bin/bash cd /Users/hawkarhama/Desktop/RUN echo $(java -jar IPM.jar 0 20 3 sign.txt) echo $(java -jar IPM.jar 1 20 3 sign.txt) echo $(java -jar IPM.jar 2 20 3 sign.txt)
If, say, the second one took more than five minutes, I want to stop it and continue to the next one. So the maximum time for each running jar is 5 minutes. If it takes less than that, that's fine; but if one runs longer than that, the script must continue to the next one.