home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / fortran / 4734 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.5 KB  |  41 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi
  3. From: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
  4. Subject: Re: file redirection under unix
  5. References:  <1992Dec15.192847.12970@wl.com>
  6. Message-ID: <BzBJo0.9It@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Reply-To: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
  9. Organization: MRL - UIUC
  10. Distribution: usa
  11. Date: Tue, 15 Dec 1992 20:59:59 GMT
  12. Lines: 27
  13.  
  14. In article <1992Dec15.192847.12970@wl.com>, agrafiot@wl.com (Dimitris Agrafiotis) writes:
  15. |>A trivial question: how does one redirect fortran output on a unix system?
  16. |>(the vms equivalent would be DEFINE FOR012 file.dat). If the answer is
  17. |>soft links, how do we take care of multiple versions of the program 
  18. |>running in the same default directory?
  19.  
  20. in these terms there is no solution.
  21. i use to create a directory for each execution, with something like
  22. (in a shell script)
  23.  
  24. mkdir pgm$$
  25. cd pgm$$
  26. ln -s path_of_your_input_file fort.10 
  27. pgm.x
  28. mv fort.11 path_of_your_output_file
  29. cd ..
  30. rm -r pgm$$
  31.  
  32. the $$ is replaced by the process number so that each running
  33. copy has a separate directory.
  34. of course another solution is to put filenames in the OPENs,
  35. which makes the programs Unix-dependent.
  36. --
  37. Furio Ercolessi
  38. Materials Research Laboratory           |   Intl School for Advanced Studies
  39. Univ. of Illinois at Urbana-Champaign   |   Trieste, Italy
  40. furio@uiuc.edu                          |   furio@sissa.it
  41.