[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
incorrect quoting of commands
From: |
Roland Freikamp |
Subject: |
incorrect quoting of commands |
Date: |
Sat, 23 Jan 2021 13:38:15 +0100 |
Dear All,
parallel uses terribly incorrect quoting for its commands.
Examples:
1. $ echo 1 | parallel bash -c 'echo hi; echo ho {};'
Academic tradition requires you to cite works you base your article on.
If you use programs that use GNU Parallel to process data for an article in
a
scientific publication, please cite:
Tange, O. (2020, August 22). GNU Parallel 20200822 ('Beirut').
Zenodo. https://doi.org/10.5281/zenodo.3996295
This helps funding further development; AND IT WON'T COST YOU A CENT.
If you pay 10000 EUR you should feel free to use GNU Parallel without
citing.
More about funding GNU Parallel and the citation notice:
https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice
To silence this citation notice: run 'parallel --citation' once.
Come on: You have run parallel 11 times. Isn't it about time
you run 'parallel --citation' once to silence the citation notice?
ho 1
The correct output would be:
hi
ho 1
2. $ echo 1 | parallel bash -c 'myvar="hello"; echo $myvar {};'
Academic tradition requires you to cite works you base your article on.
If you use programs that use GNU Parallel to process data for an article in
a
scientific publication, please cite:
Tange, O. (2020, August 22). GNU Parallel 20200822 ('Beirut').
Zenodo. https://doi.org/10.5281/zenodo.3996295
This helps funding further development; AND IT WON'T COST YOU A CENT.
If you pay 10000 EUR you should feel free to use GNU Parallel without
citing.
More about funding GNU Parallel and the citation notice:
https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice
To silence this citation notice: run 'parallel --citation' once.
Come on: You have run parallel 15 times. Isn't it about time
you run 'parallel --citation' once to silence the citation notice?
1
The correct output would be:
hello 1
The reason seems that
bash -c 'echo hi; echo ho {};'
is incorrectly converted by parallel to
bash -c 'bash -c echo hi; echo ho {};'
which is effectively
bash -c echo hi
bash -c 'echo ho {}'
best regards
Roland
- incorrect quoting of commands,
Roland Freikamp <=