YouTube home Comedy Week on YouTube
Upload

Part 1: GNU Parallel script processing and execution

Ole Tange Ole Tange·18 videos
57
29,851
Like     Dislike 2

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to like Ole Tange's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to dislike Ole Tange's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to add Ole Tange's video to your playlist.

Uploaded on Jun 21, 2010

GNU Parallel version 20100620 http://www.gnu.org/software/parallel/ is a shell tool for executing jobs in parallel locally or using remote machines. A job is typically a single command or a small script that has to be run for each of the lines in the input. The typical input is a list of files, a list of hosts, a list of users, a list of URLs, or a list of tables.

If you use xargs today you will find GNU parallel very easy to use as GNU parallel is written to have the same options as xargs. If you write loops in shell, you will find GNU parallel may be able to replace most of the loops and make them run faster by running several jobs in parallel. If you use ppss or pexec you will find GNU parallel will often make the command easier to read.

GNU parallel makes sure output from the commands is the same output as you would get had you run the commands sequentially. This makes it possible to use output from GNU parallel as input for other programs.

For each line of input GNU parallel will execute command with the line as arguments. If no command is given, the line of input is executed. Several lines will be run in parallel. GNU parallel can often be used as a substitute for xargs or cat | bash.

Loading icon Loading...

Loading icon Loading...

Loading icon Loading...

The interactive transcript could not be loaded.

Loading icon Loading...

Loading icon Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

Uploader Comments (Ole Tange)

  • thomasknauth

    What shell are you using? Curious with respect to the file renaming syntax using {} and {.}.bz2

    · 6

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate thomasknauth's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate thomasknauth's comment.
  • Ole Tange

    the {}, {.}, {3}, and {3.} are all GNU Parallel specific. It is not dependent on the shell.

    · 8

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Ole Tange's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Ole Tange's comment.
    in reply to thomasknauth (Show the comment)

Top Comments

  • odoublewen

    GNU parallel.... the best thing since sliced bread.

    · 11

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate odoublewen's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate odoublewen's comment.

Video Responses


All Comments (33)

Sign in now to post a comment!
  • mike vandewege

    This my new favorite bash function...thank you, thank you, thank you....thank you!

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate mike vandewege's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate mike vandewege's comment.
  • Soltan Alharbi

    Thanks Ole for this great work.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Soltan Alharbi's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Soltan Alharbi's comment.
  • hathuctube

    Ole' !

    Great tool!. Isn't this what the openCL folks tried to accomplish?

    Thanks!

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate hathuctube's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate hathuctube's comment.
  • jeremiasz rebelka

    this thing is amazing - I'm using it for video transcoding - it compiles no problem even on old systems it is very small yet extremely useful

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate jeremiasz rebelka's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate jeremiasz rebelka's comment.
  • paladeissan

    click click click click

    · 4

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate paladeissan's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate paladeissan's comment.
  • David Jenkins

    This is lovely stuff, thanks for sharing... think ill try this on my data mining grep script.

    Is your time script available for borrowing?

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate David Jenkins's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate David Jenkins's comment.
  • joaorstm

    test -z checks if a string's length is zero.

    In this case, the string being tested is probably user-configurable and can be empty.

    This does not look like a mistake, and they also didn't mean test -d because mkdir does nothing if you try to create a directory that already exists.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate joaorstm's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate joaorstm's comment.
    in reply to kalinin76 (Show the comment)
  • Loading comment...
Loading...
Loading...
Working...
Sign in to add this to Watch Later