Replacing a bash for loop for a parallel procell -


i'm struggling in redoing bash loop run in parallel.

the loop such:

for in `cat names`     cp $i.pqr dum.pqr     apbs parameters.in     mv dum.grd $i.grd     rm dum.grd done 

i tried without success. tells me 'an argument -c required'

for in `cat names`     cp $i.pqr dum.pqr     parallel -j8 apbs parameters.in     mv dum.grd $i.grd     rm dum.grd done 

can advise me on mistake?

i assume apbs takes 'dum.pqr' , turns 'dum.grd'. if 2 apbs run @ same time overwrite dum.grd. somehow need make sure names unique. maybe using dirs:

func my_apbs {   mkdir $1   cp $1.pqr $1/dum.pqr   cd $1   apbs parameters.in   mv dum.grd ../$1.grd   cd ..   rm -r $1 } export -f my_apbs parallel my_apbs :::: names 

you did not write whether have watched intro videos https://www.youtube.com/playlist?list=pl284c9ff2488bc6d1 or walked through tutorial: http://www.gnu.org/software/parallel/parallel_tutorial.html


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -