I am trying to write a .sh file that runs many programs simultaneously
I tried this
prog1
prog2
prog1 &
prog2 &
You can try ppss. ppss is rather powerful - you can even create a mini-cluster. xargs -P can also be useful if you've got a batch of embarrassingly parallel processing to do.
With GNU Parallel http://www.gnu.org/software/parallel/ it is as easy as:
(echo prog1; echo prog2) | parallel
Or if you prefer:
parallel ::: prog1 prog2
Learn more: