home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume17 / contest-prog / part01 / testem < prev    next >
Encoding:
Text File  |  1989-02-06  |  487 b   |  37 lines

  1. #! /bin/sh
  2. for i in 1 2 3 4 5 6 13 14 15 16 17 18
  3. do
  4. echo $i
  5. if test -f prob$i.ok
  6. then
  7. continue
  8. fi
  9. if test -f prob$i.e
  10. then
  11. :
  12. else
  13. bduflag=""
  14. case $i in
  15.     *17*) echo cc  ${bduflag} prob17.c -o prob17.e
  16.      cc  ${bduflag} prob17.c -o prob17.e -lm;;
  17.     *) echo cc prob$i.c -o prob$i.e
  18.      cc prob$i.c -o prob$i.e ;;
  19. esac
  20. fi
  21. echo $i
  22. prob$i.e<prob$i.in>prob$i.tst
  23. if compare prob$i.ans prob$i.tst
  24. then
  25. echo ok
  26. cp /dev/null prob$i.ok
  27. else
  28. echo bad
  29. rm prob$i.e
  30. fi
  31.  
  32.  
  33.  
  34. diff prob$i.ans prob$i.tst
  35. done
  36.  
  37.