Re: printing from command line

Jesse Pollard (pollard@tomcat.admin.navo.hpc.mil)
Fri, 22 Mar 2002 15:10:35 -0600 (CST)


walt <walt@nea-fast.com>:
>This is a general linux question, not really a kernel question. Does
>anyone know if there is a "simple" good way to print code from linux at
>the command promt. On a Solaris machine,
>/usr/openwin/bin/mp -o -l filename
>gives me a page with 2 columuns, user_name, date, and pagenumber at the
>top of each column, and the filename at the bottom of each column. I've
>read lots of howtos and man pages, even wrote a perl script to wrap the
>lines for me, but I haven't figured out how to get the same format from
>Linux as I do from Solaris.

check the "pr" command:

pr -m file1 file2

Will format the output in two columns, file1 on the left, file2 on the right.

It doesn't include username, but does have the date (top left) and page number
(top right).

An arbitrary title/heading may be specified with the -h option. The
heading is at the top, center of each page.

I've found that a single column was best based on readability (most source
files will indent so far to the right that only a single column will do).

If you want fancier printing try enscript, this utility allows for 1/2/n
columns. (This one does a nice job for line numbers). The output is
postscript - so options for various fonts and sizes are available.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/