GNU parallel double-dashed options not working

断了今生、忘了曾经 提交于 2019-12-11 05:18:58

问题


I am trying to run the following very simple parallel script:

 parallel --eta -j 1 -- "echo hi"

but I get an error

parallel: invalid option -- '-'
parallel [OPTIONS] command -- arguments
    for each argument, run command with argument, in parallel
parallel [OPTIONS] -- commands
    run specified commands in parallel

This happens for every double-dashed option I try to use


回答1:


You are using Tollef's parallel from Moreutils, and not GNU Parallel.




回答2:


If you are not using the Tollef's parallel then try this:

  • Run whereis parallel to get the path of parallel exec binary in your system. Run using the absolute path returned by this command.

Optionally, you can add an alias for this in ~/.bashrc or ~/.zshrc file like:

alias parallel='/usr/local/bin/parallel'



来源:https://stackoverflow.com/questions/46639710/gnu-parallel-double-dashed-options-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!