How to use parallel execution in a shell script?

Posted by eSKay on Stack Overflow See other posts from Stack Overflow or by eSKay
Published on 2010-05-07T19:09:20Z Indexed on 2010/05/07 19:18 UTC
Read the original article Hit count: 101

I have a C shell script that does something like this:

#!/bin/csh
gcc example.c -o ex
gcc combine.c -o combine
ex file1 r1     <-- 1
ex file2 r2     <-- 2
ex file3 r3     <-- 3
#... many more like the above
combine r1 r2 r3 final
\rm r1 r2 r3

Is there some way I can make lines 1, 2 and 3 run in parallel instead of one after the another?

© Stack Overflow or respective owner

Related posts about shell

Related posts about shell-scripting