All of lore.kernel.org
 help / color / mirror / Atom feed
* printing from command line
@ 2002-03-22 20:16 walt
  2002-03-22 21:20 ` Mr. James W. Laferriere
  2002-03-22 21:26 ` Richard B. Johnson
  0 siblings, 2 replies; 4+ messages in thread
From: walt @ 2002-03-22 20:16 UTC (permalink / raw)
  To: linux-kernel

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.

Thanks!

--
Walter Anthony
System Administrator
National Electronic Attachment
"If it's not broke....tweak it"




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: printing from command line
@ 2002-03-22 21:10 Jesse Pollard
  0 siblings, 0 replies; 4+ messages in thread
From: Jesse Pollard @ 2002-03-22 21:10 UTC (permalink / raw)
  To: walt, linux-kernel

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: printing from command line
  2002-03-22 20:16 printing from command line walt
@ 2002-03-22 21:20 ` Mr. James W. Laferriere
  2002-03-22 21:26 ` Richard B. Johnson
  1 sibling, 0 replies; 4+ messages in thread
From: Mr. James W. Laferriere @ 2002-03-22 21:20 UTC (permalink / raw)
  To: walt; +Cc: linux-kernel


	Hello Walt , man a2ps .  Give that a try or if not found give the
	net a search on it .  Hth ,  JimL

On Fri, 22 Mar 2002, walt wrote:

> 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.
>
> Thanks!
>
> --
> Walter Anthony
> System Administrator
> National Electronic Attachment
> "If it's not broke....tweak it"
>
>
>
> -
> 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/
>

       +------------------------------------------------------------------+
       | James   W.   Laferriere | System    Techniques | Give me VMS     |
       | Network        Engineer |     P.O. Box 854     |  Give me Linux  |
       | babydr@baby-dragons.com | Coudersport PA 16915 |   only  on  AXP |
       +------------------------------------------------------------------+


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: printing from command line
  2002-03-22 20:16 printing from command line walt
  2002-03-22 21:20 ` Mr. James W. Laferriere
@ 2002-03-22 21:26 ` Richard B. Johnson
  1 sibling, 0 replies; 4+ messages in thread
From: Richard B. Johnson @ 2002-03-22 21:26 UTC (permalink / raw)
  To: walt; +Cc: linux-kernel

On Fri, 22 Mar 2002, walt wrote:

> 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.
> 
> Thanks!

I think you want `pr` although some formatting isn't automatic. `man pr`
shows it takes more parameters than `ls`. Fortunately, you can make
an alias.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

                 Windows-2000/Professional isn't.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-03-22 21:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-22 20:16 printing from command line walt
2002-03-22 21:20 ` Mr. James W. Laferriere
2002-03-22 21:26 ` Richard B. Johnson
  -- strict thread matches above, loose matches on Subject: below --
2002-03-22 21:10 Jesse Pollard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.