How do I create a 'dummy' printer?

I'm having trouble with a program I'm working on, which generates spurious printouts. I'd like to create a new entry in /etc/printcap to send the this unwanted output to. What's the best way to do that? Thanks.
 
There are a couple of ways.

One would be
Code:
:if=/dev/null:\

Your wayward program would send the printout but it would die at /dev/null.

If you need to look at the output, you could set a second print queue. Section 9 in the handbook describes setting up multiple queues. Combine this with a smart filter -> postscript with print/a2ps or print/enscript-letter

Another option is to use lpc(8) to turn off the printer daemon.
 
Thanks for that helpful post. I added this line to /etc/printcap
Code:
dummy:if=/dev/null
Now the line
Code:
$ lpr -Pdummy filename
prints NOTHING AT ALL - HURRAH!
 
Back
Top