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?
How about:
prog1 & prog2 && fg
This will:
prog1
.prog2
, and keep it in foreground, so you can close it with ctrl-c
.prog2
, you'll return to prog1
's foreground, so you can also close it with ctrl-c
.