#! /bin/csh -f

foreach f ( *.plot )
set n = ${f:r}
set tn = "/tmp/$$-$n"
nawk -f monotone-energy-plot.nawk < $n.plot > $tn.plot
cat ${n}.gnuplot  | sed -e '1,$s@'"${n}"'\.plot@'"${tn}"'\.plot@g' > $tn.gnuplot
gnuplot -geometry =500x500+300+200 < $tn.gnuplot
/bin/rm -f $tn.plot $tn.gnuplot
end

