Part 2: GNU Parallel script processing and execution

preview_player
Показать описание

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.
Рекомендации по теме
Комментарии
Автор

I'm amazed, Ole, that you shot these videos without any mistakes. Obviously well-prepared, but still, you're a maestro at copy&pasting.

bmjpdx
Автор

Thank you for such a useful tool sir. I use it daily ! Love & Respect ❣🙏

ajit
Автор

Very nice tool ! Thank you very much for that.

I know it's all for education purpose, but to be strict, line like
$ seq 1 10 | parallel -X echo mkdir test-{}.dir
could be written easier in bash basing on it's specific feature
$ echo mkdir test-{1..10}.dir

jkjlkhiugoo
Автор

This is 5 years old, how can it not be installed by default yet on a standard distro!!!

xorbe
Автор

fantastic for speeding a lengthy grep up.

patrickscottbest
Автор

That was interesting and informative. Thank you for making it.

daldous
Автор

Holy shit, that's a large difference in run time: 6:01

yogeshg
Автор

At the start, we you executed several commands, why did you use && instead of ; ? Thank you for the video.

HumanSpeak
Автор

I'm completely new at any of this, and i would like to know if you could help me get started.. I was wondering if there is a book, or something i could read to learn how to completely build and write script for a web page..The simplest form would work.

captinsparklebitch
Автор

how many levels of nesting does parallel support? parallel inside parallel inside parallel and so on....

jagadeeshakanihal