Re: OT: launching jobs in a combined serial parallel way
Kamaraju S Kusumanchi <raju.mailinglists@gmail.com> writes:
[...]
> progc should to be launched only after both proga, progb are finished. progc
> takes another couple of hours to finish.
>
> What is good way to automate this problem (that is no manual
> interaction)?
In a shell script, run proga and progb in the background, then wait
for them both with the "wait" builtin. Something like this:
#!/bin/sh -e
# -e flag will abort on any error
proga & # Start proga in background
progb & # Start progb in background
wait # Wait for whichever finishes first
wait # Wait for the other one
progc # Now run progc in the foreground
----Scott.
Reply to: