Consider the following file saved as commands.txt
ls \
&& pwd
ls \
&& pwd
Now,
bash commands.txt
works as expected to give
LICENSE
/home/username/utilities
LICENSE
/home/username/utilities
but
parallel < commands.txt
gives the error
/bin/bash: -c: line 0: syntax error near unexpected token `&&'
/bin/bash: -c: line 0: `&& pwd'
ls: cannot access '\': No such file or directory
/bin/bash: -c: line 0: syntax error near unexpected token `&&'
/bin/bash: -c: line 0: `&& pwd
Why do multiple lines with the same command separated by \ not seem to work with parralel as such?