*BSD News Article 46841


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.mathworks.com!gatech!howland.reston.ans.net!agate!cocoa.brown.edu!mhw
From: Mark_Weaver@brown.edu
Newsgroups: comp.unix.bsd.misc
Subject: Re: Printcap filters question
Date: 14 Jul 1995 09:09:43 GMT
Organization: Brown University Department of Computer Science
Lines: 25
Message-ID: <3u5c8n$ki0@cocoa.brown.edu>
References: <3u0hjg$j0g@jeeves.niehs.nih.gov>
Reply-To: Mark_Weaver@brown.edu
NNTP-Posting-Host: cis-ts4-slip4.cis.brown.edu
Originator: mhw@cis-ts4-slip4.cis.brown.edu

In article <3u0hjg$j0g@jeeves.niehs.nih.gov>, duling@niehs.nih.gov (Dave Duling) wrote:
>Question:  How can I put lpr filter commands into the printcap file ?
>
>Explanation:  I have a couple of SunOS computers and I want to print to a 
>remote lpr queue that automatically wraps the data in postscript if I dont use 
>the "lpr -l" command.  However, I have an application that will print directly
>but of course it just puts out "lpr -Pxxxx" without allowing for a "-l".  So
>am I completely off base or what here ?

Make a directory containing nothing but a wrapper script for lpr(1):

    #!/bin/sh
    exec /usr/bin/lpr -l "$@"

Then make a wrapper script for your application:

    #!/bin/sh
    PATH="<scriptdir>:$PATH" exec <application> "$@"

It's a hack, but this technique comes in very handy from time to time.

	Mark
--------------------------------------------------------------------
Email: Mark_Weaver@brown.edu           | Brown University
PGP Key: finger mhw@cs.brown.edu       | Dept of Computer Science