Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!ncar!gatech!prism!mailer.cc.fsu.edu!uflorida!reef.cis.ufl.edu!ruck From: ruck@reef.cis.ufl.edu (John Ruckstuhl) Newsgroups: comp.unix.questions Subject: writing an lpr filter (SunOS 4.1.1) Message-ID: <28820@uflorida.cis.ufl.EDU> Date: 30 May 91 07:08:22 GMT Sender: news@uflorida.cis.ufl.EDU Organization: EE Dept at UF Lines: 34 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@alpha.ee.ufl.edu Dept of Electrical Engineering ruck@cis.ufl.edu, uflorida!ruck University of Florida ruck%sphere@cis.ufl.edu, sphere!ruck