GNU parallel not working at all

WaelJ picture WaelJ · May 8, 2013 · Viewed 20.2k times · Source

I have been trying to use GNU parallel for some time, but I have never been able to get it to function at all!

For example, running (in a non-empty directory!):

ls | parallel echo            # Outputs single new line
ls | parallel echo echo echo  # Outputs three new lines.
ls | parallel echo {}         # /bin/bash: {}: command not found
ls | parallel echo '{}'       # /bin/bash: {}: command not found
ls | parallel 'echo {}'       # Outputs: {}
ls | parallel -IMM 'echo MM'  # Outputs: MM

It seems that it is simply executing each argument as a command, which makes no sense.

I have tried bash, zsh, tcsh, csh, and sh, to no avail.

Answer

WaelJ picture WaelJ · May 8, 2013

As I was about to complete writing this question, I ran parallel --version to report the version, only to find:

WARNING: YOU ARE USING --tollef. IF THINGS ARE ACTING WEIRD USE --gnu.

It is not clear to me why that flag is set by default. Needless to say, using --gnu worked!

Thought I would post this to save someone hours of frustration and confusion.

EDIT: To fix this permanently (in Ubuntu at least), delete the --tollef flag in /etc/parallel/config