File: xasteroids

package info (click to toggle)
xasteroids 5.0-17.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 104 kB
  • ctags: 106
  • sloc: ansic: 792; makefile: 28; sh: 17
file content (19 lines) | stat: -rwxr-xr-x 497 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
#cd /u5/grads/goetz/X
if [ "$1" = "-s" ]
then
  /bin/cat xast.hs
else
  /bin/echo ""
  /bin/cat xast.hs
  /bin/echo ""
  /bin/echo Type 'Q' to save your high score...
  umask 77
  score=`xast.exe | /bin/cut '-d ' -f5`
  if [ "$score" != "" ]
  then
    (/bin/echo $score"	"$USER"		`/bin/date | /bin/sed 's/  / 0/g' | cut '-d ' -f1,2,3,6 | /bin/sed 's/ 0/  /g'`"; cat xast.hs) | /bin/sort +0rn -1 +5n +3M | head -10 > xast.hs2
    /bin/mv -f xast.hs2 xast.hs
    /bin/cat xast.hs
  fi
fi