kesavan
kesavan

Reputation: 13

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

Upvotes: 0

Views: 50

Answers (2)

Mark Setchell
Mark Setchell

Reputation: 207465

Consider using GNU Parallel like this:

parallel ./fud —pdb={} —command=run —state=-CRYSTAL —element=ion ::: *.pdb

There’s a great tutorial here.

Upvotes: 1

ADEpt
ADEpt

Reputation: 5542

Try xargs (-P specifies number of parallel processes to run):

ls -1 *.pdb | xargs -I {} -P8 ./fud --pdb={} --rest-of-switches > result.out

Upvotes: 0

Related Questions