#!/bin/csh -fx # this program will use the micrographlist and the segmentlist to populate the information. set voltage="200" set Cs="2\.0" set pixelsize="1\.167" set jn=`wc -l micrographlist01.txt | awk '{print $1}'` set in=1 while ($in <= $jn) @ in = $in + 1 set filename=`awk -v rown=$in '{if (NR == rown) print $1}' micrographlist01.txt` set defocus1=`awk -v rown=$in '{if (NR == rown) print $3}' micrographlist01.txt` set defocus2=`awk -v rown=$in '{if (NR == rown) print $4}' micrographlist01.txt` set azmangle=`awk -v rown=$in '{if (NR == rown) print $5}' micrographlist01.txt` awk -v filn=${filename} -v df1=${defocus1} -v df2=${defocus2} -v azg=${azmangle} -v vol=${voltage} -v cs=${Cs} -v px=${pixelsize} '{if(substr($1,1,10) == filn) printf "%-28s%10s%10s%10s%5s%5s%10s\n",$1,df1,df2,azg,vol,cs,px}' segmentlist01short.txt >> seglistfull.txt end exit