command can be used to produce nicely formatted listings of files. I
prefer enscripting with
enscript -2rG --prettyprint=cpp
This produces 2 pages of code per page
in landscape (rotated) mode with Gaudy headers. The
--prettyprint=cpp is only suitable for C++ code and
causes some keywords to be highlighted.
gives you a complete list of options.
Note that enscripted code looks ugly if it contains
line-wraps. For this reason, keep your code lines to about 80
characters in length. If you consistently get line-wraps think about
how to change your coding style and/or use of text editors.
command causes all of the commands that you are executing in a shell
to be captured in file. When you are finished
collecting command and output that you wish to be in your script file,
type ctl-D (the unix end of file
You should script the compilation and running of your
programs. I am not overly concerned about fraudulent programming, and
prefer to see enscripted code to using
One of the problems with the script program is that it
captures all of the control character information that your shell
produces to create underlining and to make corrections when you
type delete. In order to remove this junk, use
the scriptfix program as in