home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / pub / users / Harry / compilers / p3 / go2 < prev    next >
Text File  |  2005-10-19  |  697b  |  27 lines

  1. #!/bin/sh
  2. #
  3. # Use this shell script to run your program on a test file.
  4. #
  5. # Use this script from a directory containing the executable "Main.class" and a
  6. # subdirectory "tst" containing a file such as
  7. #       test01.pcat
  8. #
  9. # Type:
  10. #       go2 test01
  11. #
  12. # It will do the following:
  13. #       Print the source file
  14. #       Run "main"
  15. #       Print the output file
  16. #       Print the error output
  17. #
  18. echo --------------- Source tst2/$1.pcat: ---------------
  19. more tst2/$1.pcat
  20. java Main < tst2/$1.pcat 1> tst2/$1.out 2> tst2/$1.err
  21. echo --------------- Output stdout: ---------------
  22. more tst2/$1.out
  23. echo --------------- Error output stderr: ---------------
  24. more tst2/$1.err
  25. rm tst2/$1.out
  26. rm tst2/$1.err
  27.