Shell GNU并行双虚线选项不工作
我正在尝试运行以下非常简单的并行脚本:Shell GNU并行双虚线选项不工作,shell,gnu-parallel,Shell,Gnu Parallel,我正在尝试运行以下非常简单的并行脚本: parallel --eta -j 1 -- "echo hi" 但我犯了个错误 parallel: invalid option -- '-' parallel [OPTIONS] command -- arguments for each argument, run command with argument, in parallel parallel [OPTIONS] -- commands run specified comm
parallel --eta -j 1 -- "echo hi"
但我犯了个错误
parallel: invalid option -- '-'
parallel [OPTIONS] command -- arguments
for each argument, run command with argument, in parallel
parallel [OPTIONS] -- commands
run specified commands in parallel
对于我尝试使用的每个双虚线选项,都会发生这种情况。您使用的是来自Moreutils的Tollef并行,而不是GNU并行。如果您不使用Tollef并行,请尝试以下操作:
- 运行
以获取系统中并行执行二进制文件的路径。使用此命令返回的绝对路径运行whereis parallel
~/.bashrc
或~/.zshrc
文件中为此添加别名,如:
alias parallel='/usr/local/bin/parallel'