':::'

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

Provide 'parallel' vars to Gnu Parall using :::. The first examples of Parallel that I came across, used pipes. I think using ::: is actually the more common way.

First example

# "seq" and "5" are regarded as parallel arguments for echo ;)
$ parallel echo ::: seq 5

seq
5

The reason why this returns the arguments seq and 5, rather than the result of executing seq 5: It isn't clear that these arguments actually need to be executed! Put the arguments within $() to get them evaluated before being passed to Parallel.

Second example

This works! Note that output from parallel is usually on multiple lines:

$ i=$(seq 5)
$ echo $i
$ parallel echo ::: $i

1 2 3 4 5
1
2
3
4
5