#!/bin/tcsh

setenv TEMPFILE=ttt

rm -f $TEMPFILE 

foreach i (`ls *_all_Cons.net.convergence.out`)
  gather $i -b0.05 > $i.05.txt
  gather $i -b0.1 > $i.10.txt
  gather $i -b0.4 > $i.20.txt
  gather $i -b0.4 > $i.40.txt
end

exit

foreach i (`ls *_all_Cons.net.STATS_medium.out`)
  echo Working on $i
  awk '{ print $1 " " $5 }' $i | fgrep -v " 0" > $TEMPFILE
  gather $TEMPFILE -v2 -b0.2 > $i.txt
  rm -f $TEMPFILE
end

foreach i (`ls *_all_Cons.net.STATS_proto.out`)
  echo Working on $i
  awk '{ print $1 " " $5 }' $i | fgrep -v " 0" > $TEMPFILE
  gather $TEMPFILE -v2 -b0.2 > $i.Sent.txt
  rm -f $TEMPFILE
  awk '{ print $1 " " $7 }' $i | fgrep -v " 0" > $TEMPFILE
  gather $TEMPFILE -v2 -b0.2 > $i.Rcvd.txt
  rm -f $TEMPFILE
end

echo Tallying Totals
process2 > totals.txt
echo DONE!
