2016-08-17 27 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]" 
相關問題