Operating System - HP-UX
1837673 Members
2786 Online
110117 Solutions
New Discussion

Splitting Output to Printer/File with lp

 
Chris Frusher
New Member

Splitting Output to Printer/File with lp

I would like to split the output of a print job. i.e send one copy to the printer and another copy to a file. Is there a simple way of achieving this?
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Splitting Output to Printer/File with lp

Hi Chris:

# cat /etc/hosts|tee /tmp/hosts|lp

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Splitting Output to Printer/File with lp

Hi Chris:

I'll give you a Plan B. The other method is to modify the /var/spool/lp/interface/myprinter file where myprinter is the desired print queue. You can use this method if all the output jobs need to be archived and you want to make the operation invisible to the users and applications. You will need to generate a unique filename for each job. In many cases it is common to create a directory for each queue.

Regards, Clay
If it ain't broke, I can fix that.
Chris Frusher
New Member

Re: Splitting Output to Printer/File with lp

Hi Clay,

Thanks for the input. I assumed this would be the solution. This might sould a bit daft. But I'm not sure exactly what changes I'll have to make.


Regards