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
but despite file lookscode: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
what result of echo command sequence of 1.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
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
Post a Comment