#! /bin/csh -f 
# Last edited on 1998-07-16 06:32:51 by stolfi

set usage = "$0 SAMPLE..."

set samples = ( $* )

cat <<EOF
    sample         chars  M    h_2    h_3    h_4
    ------------- ------ -- ------ ------ ------
EOF

foreach sam ( ${samples} )
  printf "    %-12s" "${sam}"
  set line = "`grep 'full text' ${sam}/L1R0.cmt`"
  printf " %7d"  `echo "$line" | sed -e 's/^.*: *//' -e 's/ charac.*$//'`
  set line = "`grep 'alphab' ${sam}/L1R0.cmt`"
  printf " %2d"  `echo "$line" | sed -e 's/^.*= *//'`
  foreach k ( 1 2 3 )
    set line = "`grep 'mean.*entropy' ${sam}/L${k}R0.cmt`"
    printf " %6.3f"  `echo "$line" | sed -e 's/^.*: *//' -e 's/ bits\/ch.*$//'`
  end
  printf "\n"
end
