Red Hat Topics - printing from bash terminal

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > July 2005 > printing from bash terminal





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author printing from bash terminal
Anthony Galea

2005-07-11, 2:46 am

Hi all. Sorry to be such a bother. I am an absolute newbie to Linux
and have managed to successfully install Fedora Core 4 on my second
hard drive.

I have also managed to get CUPS to find my printer. But I have no
success in getting the lp or the lpr command to work when I want to
print man pages or anything else from my bash shell.

Does anybody have any suggestions? I have read that Red hat use the
printtool but when i try to get that running it just comes up with
error messages.

Any help greatly appreciated.

Thank you all

Tony
Lenard

2005-07-11, 7:45 am

Anthony Galea wrote:

> Hi all. Sorry to be such a bother. I am an absolute newbie to Linux
> and have managed to successfully install Fedora Core 4 on my second
> hard drive.
>
> I have also managed to get CUPS to find my printer. But I have no
> success in getting the lp or the lpr command to work when I want to
> print man pages or anything else from my bash shell.


What step have you taken?? Where is your printer?? Is it a network
printer attached to a Windows system?? Please explain.

> Does anybody have any suggestions? I have read that Red hat use the
> printtool but when i try to get that running it just comes up with
> error messages.


Which are??


> Any help greatly appreciated.


If CUPS is installed and configured correctly the all you need to do is
type something like; lpr filename

Printing a man page can be done by typing the following two lines for
example;

man lpr > lpr.txt
lpr lpr.txt

Please review;
http://www.catb.org/~esr/faqs/smart-questions.html


--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- B. Franklin, 1759
Ivan Marsh

2005-07-11, 5:47 pm

On Mon, 11 Jul 2005 12:18:58 +0000, Lenard wrote:

> Anthony Galea wrote:
>
>
> What step have you taken?? Where is your printer?? Is it a network
> printer attached to a Windows system?? Please explain.
>
>
> Which are??
>
>
>
> If CUPS is installed and configured correctly the all you need to do is
> type something like; lpr filename
>
> Printing a man page can be done by typing the following two lines for
> example;
>
> man lpr > lpr.txt
> lpr lpr.txt


Could you not also: man lpr | lpr
?

--
"Blessed is he who expects nothing, for he shall never be disappointed."
Benjamin Franklin (I didn't know he was a Buddhist)

Lenard

2005-07-11, 8:45 pm

Ivan Marsh wrote:

>
> Could you not also: man lpr | lpr
> ?


Yes, but it's (also) nice to reformat the paging to make reading the
text easier. For example, using the manpage for lpr the COMPATIBILITY
section starts on the printed page one with the bold section header
along with the first line. Then on the second printed page the second
line of the section, with some printers. I perfer to add a couple of
line feeds and have the COMPATIBILITY section all on one page.


--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- B. Franklin, 1759
Scott Lurndal

2005-07-12, 8:47 pm

Lenard <Lenard@127.0.0.1> writes:
>Ivan Marsh wrote:
>
>
>Yes, but it's (also) nice to reformat the paging to make reading the
>text easier. For example, using the manpage for lpr the COMPATIBILITY
>section starts on the printed page one with the bold section header
>along with the first line. Then on the second printed page the second
>line of the section, with some printers. I perfer to add a couple of
>line feeds and have the COMPATIBILITY section all on one page.
>


Even better:

$ zcat /usr/share/man/man1/lpr.1.gz | groff -man | lp -d printer1

scott
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com