Up: Appendix: Some Advice for
Previous: Errors in MC and
A very intelligent turtle
Found programming UNIX a hurdle
The system, you see,
Ran as slow as did he,
And that's not saying much for the turtle.
- Compilation:
- Suppose the Fortran code is stored in the file progX.f. The command
make progX
makes the executable called progX (provided that you do not
have a file called makefile or Makefile in the same
directory
). It can be executed by just typing the executable name,
exactly as any other Unix command.
- Output redirection:
- If a program (or any Unix command)
progX writes
to the standard output (screen), the output can be redirected to a
file outfile by typing
progX > outfile
- grep and friends:
- The command grep is very
useful to extract information from output files. It is a standard
Unix command that extracts lines from the given file containing
given string. For example, to extract all energy values, stored in
the file outfile, just
type
grep Ener outfile
and you will have them on the screen. To
store them in the file enerfile, do this:
grep Ener outfile > enerfile
Programs like sed or awk can be very useful for
producing tabulated data suitable for plotting programs.
Up: Appendix: Some Advice for
Previous: Errors in MC and
© 1997
Boris Veytsman
and Michael Kotelyanskii
Tue Dec 2 20:15:24 EST 1997