Skip to main content

Thread: using awk to look into a file


dear all,
i'm trying use awk if clause file , use information there run command external program. need file made of 2 numerical columns , need assign each line value of each column variable use later external command.
code
code:
for ((j=1; j=2; j++)) snapshoot=`awk '{$2 &&  nr==$j}' xtc_file.txt` trajectory=`awk '{$1 && nr==$j}'  xtc_file.txt` snapshot_fin=`expr $snapshoot + 1` echo $snapshot $trajecory $snapshot_fin    /home/cocktail/vitalini/gromacs_special/bin/trjconv -f /home/cocktail/noe/my_papers/dynamin-dimer/sims/analysis/allsims/300-$j.xtc -s ../../starting_files/dynamin_dimer_cg.gro -o ../cg_gro/300-$j-$snapshoot.gro  -center -b $snapshoot -e $snapshoot_fin  done
but despite file looks

code:
26      1 26      2 26      3 26      4 26      5 26      6 26      7 26      8 26      9 26      10 26      11 26      12 26      13 26      14 26      15 26      16 26      17
what result of echo command sequence of 1.
can me use awk assign values variable? or if has better suggestion on how solve problem appreciate that.
thanks!
fra

what
code:
for ((j=1; j=2; j++))
?
having infinite loop because of no terminating condition .


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] using awk to look into a file


Ubuntu

Comments

Popular posts from this blog

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?