Betamoo Betamoo - 5 months ago 11
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
prog1 &
prog2 &