#!/bin/sh
#cd /u5/grads/goetz/X
if [ "$1" = "-s" ]
then
  /usr/bin/cat xast.hs
else
  echo ""
  /usr/bin/cat xast.hs
  echo ""
  echo Type 'Q' to save your high score...
  umask 77
  score=`xast.exe | /bin/cut '-d ' -f5`
  if [ "$score" != "" ]
  then
    (echo $score"	"$USER"		`/usr/bin/date | /usr/bin/sed 's/  / 0/g' | cut '-d ' -f1,2,3,6 | /usr/bin/sed 's/ 0/  /g'`"; cat xast.hs) | /usr/bin/sort +0rn -1 +5n +3M | head -10 > xast.hs2
    /bin/mv -f xast.hs2 xast.hs
    /usr/bin/cat xast.hs
  fi
fi
