for i in `ls -1 ../../engineering/tdr*_summary*.tex`; do a=tmp.t; x=`cat $i | grep 'SVN~' | awk -F$ '{print "$"$3" $ "}'` ; echo \\svnInfo $x > tmp.t; echo % the variable sumsection should be set to a valid LaTeX section/subsection... keyword >> tmp.t ; head -3 $i | sed s/section/sumsection/ >> tmp.t; echo " "{\\it SVN~revision~ID:~} \\svnId >> tmp.t; cat $i | awk 'FNR>4{print}' >> tmp.t ; j=`echo $i | sed s/tdr/tcr/`; echo tmp.t $j ; done