home *** CD-ROM | disk | FTP | other *** search
/ Powerdrive 1997 February / POWERDRIVE0297.ISO / share / rollen / nethack / misc / nhav next >
Text File  |  1994-12-13  |  936b  |  43 lines

  1. #!/bin/sh
  2.  
  3. # From: ralf@ark.btbg.sub.de (Ralf W. Stephan)
  4. # Additions: dedos4@win.tue.nl
  5. # Subject: Script
  6. # Date: Sat, 12 Feb 1994 12:01:41 GMT
  7. #
  8. # While I'm at it, here is another little script for the stat freaks:
  9. # (Change '/home/svin04d/dedos4/bin/nethackdir/record' to your convenience)
  10. #
  11. # The output looks like:
  12. #
  13. # S:   15  116077 1741160
  14. # E:   11  103498 1138475
  15. # V:   15   23642  354629
  16. # B:   12   18708  224490
  17. # T:    4   12931   51723
  18. # H:    5   10579   52893
  19. # P:   11   10298  113273
  20. # K:    3    3827   11482
  21. # A:    4    3616   14462
  22. # C:    3    3556   10668
  23. # W:   12    3403   40837
  24. # R:    4    2668   10672
  25.  
  26. cat /home/svin04d/dedos4/bin/nethackdir/${1:-record} | awk '
  27.  
  28. BEGIN {ORS=": "}
  29.  
  30. !/quit/    {    c = substr($9,1,1)
  31.         sum[c] += $8
  32.         num[c]++
  33.     }
  34.  
  35. END    {    for (c in num)
  36.         { print c
  37.           printf "%4d %7.0f %7.0f\n", num[c], sum[c]/num[c], sum[c]
  38.         }
  39.     }
  40.  
  41. ' | sort -nr +2
  42.  
  43.