Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 062010
 

Executing jobs in parallel using GNU parallel

Answer:

GNU parallel is a tool for executing jobs in parallel. It is not part of standard Linux distribution yet, so it is so worth to install it.

You can download the latest version from: http://ftp.gnu.org/gnu/parallel/

E.g.

# wget http://ftp.gnu.org/gnu/parallel/parallel-20101202.tar.bz2
# tar -jxvf parallel-20101202.tar.bz2
# cd parallel-20101202
# ./configure
# make && sudo make install

Example usages:

#  echo -e "a\nb\nc"  | parallel echo "foo"

foo a
foo b
foo c