Pulling something back from the unix spooler
Posted on 2003-02-20
I'm hoping someone can help. I'm trying to write routine to retrive the text of a print job that has already been submitted to the lp subsystem for printing.
There is a 3rd party software program that we have no control over that sends its output (simple ASCII) to a particular queue, which has no printer physically attached. I'm looking for a way to retrieve that output. The directories and files of the lpd daemon (/var/spool/blah/blah/blah) are all owned by root (and I do not want this script to run as root), so I cannot simply copy the output with cp. I can, however, run it with the same userid as the spooling program.
Is there a way to "redirect" the output from a job awaiting printing? BTW, I'm running a recent version of DEC UNIX on this box.