Parallel Tasks

Jonathan Hutchins hutchins at opus1.com
Tue Jul 23 00:45:22 CDT 2002


Well, good ol' "man bash" has the answers all right.

Terminate the command with the ampersand to run parallel, use the wait
command without arguments to wait until all child processes complete.

So it's:

#!/bin/bash
sort1 &
sort2 &
sort3 &
wait
index
# EOF

Which will run sort1 - sort3 in parallel, and when all three complete will
run index.




More information about the Kclug mailing list