2

I have set up a number of processes in the background that need to finish processing before the next process can be started. While I've got this set up, there is one step where 2 programs need to be started at the same time, but I only need one of these to finish in order for the next steps to run. I don't need the second program to finish for the next step to start.

prog1 prog2

prog3

What I need is for prog3 to start when prog1 has finished, leaving prog2 to continue running. Is this possible? Anything I've tried is waiting for prog2 to finish processing before starting prog3.

3
prog2 & (prog1 ; prog3) &
1
prog1 &; pid1=$!; prog2 &; wait $pid1; prog3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.