Betamoo Betamoo - 1 year ago 72
Linux Question

How do you run multiple programs in parallel from a bash script?

I am trying to write a .sh file that runs many programs simultaneously

I tried this

prog1
prog2


But that runs prog1 then waits until prog1 ends and then starts prog2...

So how can I run them in parallel?

Answer Source
prog1 &
prog2 &