writing an lpr filter (SunOS 4.1.1)

John Ruckstuhl ruck at reef.cis.ufl.edu
Thu May 30 17:08:22 AEST 1991


My first attempt at writing a simple lpr filter has failed, so I ask for
a correction to my point-of-view, or a pointer to a reference.

We run SunOS 4.1.1 on SPARCs.

We currently lpr to an HP PaintJet without any lpr-filtering (ie, the
simple printcap entry has no filters, not even "if" or "of" defined).

I'd like to prefix and postfix each printjob with an escape sequence, so
I modified the printcap to include 
    :if=/usr/local/lib/paintjet/if:of=/usr/local/lib/paintjet/of:
and wrote the simple if
    #! /usr/bin/sh
    /usr/5bin/echo '\033E\033&/6A\033%1BIN;WU0;PW0.01;\c'
    cat
and simple of
    #! /usr/bin/sh
    cat
    /usr/5bin/echo 'PG;\c'
and made the files executable.
Then, I restarted the lpr daemon (by entering lpc, and restarting all)

As I said, this did not work for me.  Please recommend my next step.
Do lpr filters I/O with specially named files instead of stdin and
stdout as I've assumed?

Thank you for your time and help.

Best regards,
ruck.
-- 
John R Ruckstuhl, Jr			ruck at alpha.ee.ufl.edu
Dept of Electrical Engineering		ruck at cis.ufl.edu, uflorida!ruck
University of Florida			ruck%sphere at cis.ufl.edu, sphere!ruck



More information about the Comp.unix.questions mailing list