
# non_zero_states counts the number of characters in a file which are 
# different from the character '.'

case $# in
0)      echo 'Usage: non_zero_states ca_file' 1>&2; exit 1;;
esac

sed 's/\.//g
     /.$/!d' $1 | wc | awk '{print $3-$1}'
