#
if ($#argv != 2) then
    echo "need 2 args: directory extension"
    exit 1
endif

foreach i ($1/*.out)
  echo "doing $i"
  awk '/Otter/,/end of input/ {print} /statistics/,/Process.*finished/ {print}' $i > $i:r.$2
  /bin/rm $i
end
