使用多个处理器 运行 shell 脚本
Using multiple processer to run the shell script
Shell :
for a in `ls -1 *.pdb`; do ./fud --pdb=$a --command=run --state=-CRYSTAL --element=ion ; done
cat //home/*.fxout >> results.out
fgrep -v 1 results.out > new.out
试试xargs(-P指定并行进程数到运行):
ls -1 *.pdb | xargs -I {} -P8 ./fud --pdb={} --rest-of-switches > result.out
考虑像这样使用 GNU Parallel:
parallel ./fud —pdb={} —command=run —state=-CRYSTAL —element=ion ::: *.pdb
有很棒的教程here。
Shell :
for a in `ls -1 *.pdb`; do ./fud --pdb=$a --command=run --state=-CRYSTAL --element=ion ; done
cat //home/*.fxout >> results.out
fgrep -v 1 results.out > new.out
试试xargs(-P指定并行进程数到运行):
ls -1 *.pdb | xargs -I {} -P8 ./fud --pdb={} --rest-of-switches > result.out
考虑像这样使用 GNU Parallel:
parallel ./fud —pdb={} —command=run —state=-CRYSTAL —element=ion ::: *.pdb
有很棒的教程here。