GNU:
sudo apt-get install parallel
There is also one in moreutils... https://superuser.com/questions/917577/how-can-i-install-gnu-parallel-alongside-moreutils-on-ubuntu-debian
Run echo
100 times in parallel:
seq 100 | parallel echo '{}'
printf 'a.c\nb.c\nc.c\n' | parallel --will-cite echo '{.}'
Outcome:
a
b
c
Very convenient!
Determines what happens on failure:
seq 100 | parallel --halt=0 false
echo $?
0
: default. Don't halt on failure. Exit status is the number of failures.1
: don't start new processes on failure. Exit status is the last failure.2
: kill everyone else on failure.