2016-08-17 23 views
1

在下面的脚本我想明确地并发作业的集数来运行命令:如何设置对GNU并行作业数在我的剧本

#!/usr/bin/parallel -j 2 --shebang-wrap /bin/bin 
echo hi "[email protected]" 

当我运行该脚本,我得到以下error: parallel:错误解析--jobs/-j/- max-proc/-P失败

有关如何在使现有脚本并行时设置多少个作业的想法?

+1

我觉得参数'--shebang-wrap'应该是'/斌/ sh'或'/斌/ bash',而不是'/ bin/bin'。 – chepner

回答

1

man page

--shebang-wrap must be set as the first option.

这应该工作:

#!/usr/bin/parallel --shebang-wrap -j 2 /bin/bash 
echo hi "[email protected]" 
相关问题