gnu-parallel - 处理多个参数时的奇怪行为

gnu-parallel - Weird behavior when handle multiple arguments

我使用的是 GNU Parallel 版本 20170322,当我尝试使用多个参数时出现了一些异常行为。例如 parallel echo ::: A B C ::: 1 2 3 return A 1 A 2 B 1 B 2 正如预期的那样,但是 parallel echo {} and {} ::: A B ::: 1 2 return A 1 and A 1 A 2 and A 2 B 1 and B 1 B 2 and B 2

parallel echo {1} and {2} ::: A B ::: 1 2 1 and 2 A 1 1 and 2 A 2 1 and 2 B 1 1 and 2 B 2

我尝试重新安装甚至使用 Rust 叉子,但我遇到了同样的问题

parallel echo {} and {} ::: A B ::: 1 2 按设计进行:插入 {} 两次。

你的 shell 可能在取笑你(也许你正在使用 tease-sh (tcsh))。尝试:

parallel echo '{'1} an'd {2}' ::: A B ::: 1 2