Reputation: 1172
I am running a couple of background processes in my shell script. I want to exit the script when one of the two processes exit.
If I apply:
wait $PID1
wait $PID2
It'll will wait for process 1 to complete and then wait for process 2. Same happens for:
command 1 && command 2 && wait
Is there any way I could perform an or operation on the wait command?
Upvotes: 2
Views: 129