Do you mean the ::: syntax? It's because it's easier to type
parallel echo ::: 1 2 3
Than it is to type:
printf '1\n2\n3\n' | parallel echo
If you mean the -I option, you might sometimes want to pass {} in an argument to a program, which would conflict with parallel replacing {} with an input value; so you can change the replacement string to something else if you need to.
I've never liked the GNU Parallel documentation very easy to navigate etc. I wish it was available as an info file instead of a giant manpage...
In general GNU Parallel is a much more powerful version of xargs. If you understand why you'd use xargs then you can use parallel for the same sort of stuff, but with more bells and whistles.
4 comments
[ 3.0 ms ] story [ 28.0 ms ] thread> The replacement string {} can be changed with -I: parallel -I ,, echo ,, ::: A/B.C
This is way too over my head maybe but what's the utility of this in real world?
There are other examples i got lost on too.. Honestly struggling here.
I've never liked the GNU Parallel documentation very easy to navigate etc. I wish it was available as an info file instead of a giant manpage...
In general GNU Parallel is a much more powerful version of xargs. If you understand why you'd use xargs then you can use parallel for the same sort of stuff, but with more bells and whistles.
See also: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... one of which was https://vfoley.xyz/parallel/ (Simple usage of GNU parallel)