![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Please Help Me Guys | zanetti321 | UNIX for Advanced & Expert Users | 8 | 03-02-2008 11:15 AM |
| Hi guys... | vinayraj | UNIX for Advanced & Expert Users | 1 | 02-07-2008 11:37 PM |
| Thanks guys | b_manu78 | AIX | 0 | 01-03-2006 06:43 AM |
| Hi again guys | M_Hafez | UNIX for Dummies Questions & Answers | 1 | 01-16-2005 11:48 AM |
| i need your guys help | souldier | UNIX for Advanced & Expert Users | 21 | 03-29-2002 07:26 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Help guys!
Hello Guys,
I have written the following script to do certain job. I have more than 300 files, all are .pdb & .out files. and the files are (1,3,5,7,11,13,15,17,21,.......787,791,793,795).pdb /.out . But the way I created the for loop in my script works only one file at a time. But that is not the purpose of a for loop. So could you please help me how can I modify for loop in the following script so the script can process all the files a single run. thanks advance! for ((i=131;i<=131;i++)); do awk '{gsub("PW " ,"TRP"); print}' $i.pdb > $i.amberized.pdb awk -f ./get.amber.parm.10.awk ./$i.modified.pdb 1.07 1.0 > ./$i.amberized.pdb tstart=`grep -an -w "Atom No." $i.out | awk '{print $1}' | sed "s/:/ /" | awk '{print $1+1}'` tstop=`echo $tstart | awk '{print $1+2962}'` head -$tstop $i.out | tail -2963 > tmp cut -c 1-55 $i.amberized.pdb > first_half cut -c 65- $i.amberized.pdb > end cut -c 27-35 tmp > charges paste -d '' first_half charges | paste -d '' - end > $i.AM1.pdb # exit rm tmp >& /dev/null; rm end >& /dev/null; rm charges >& /dev/null; rm first_half >& /dev/null; done |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|