#!/bin/csh -f

setenv LANG C

if ($#argv != 1) then
  echo Usage: $0 'matrix-range-high-k-noise_level.txt'
  echo '    E.g. app-phase2-matrix-range-high-3-60.txt'
  echo '    E.g. app-phase2-matrix-range-high-4-60.txt'
  exit $#argv
  endif

set outf = $1
cat $outf | \
    egrep TOP_ | \
    awk '{s=$0;sub("^.*TOP_[0-9]* *","",s);if(s==p)next; if(p!="")c++; print;p=s;} END{print "TOP CHANGES =", c;}'


