> From [EMAIL PROTECTED] Thu Aug 16 23:35:04 2001
> Date: Fri, 17 Aug 2001 01:01:43 -0400 (EDT)
> From: Ryan Novosielski <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: RE: LPRng: lpq
>
> Well, it IS able to talk directly to the server, but when it encounters my
> printer for which I wish to supress only the subqueue (though it really
> does seem as if the ENTIRE queue is suppressed, not just the subqueue,
> y'know, the internal one in the print server box), it gives that error
> message (apparently because I'm executing an lpc command and that queue
> does not support C)... here's my printecap if it helps any:
>
> lp
>  :ab
>  :af=acct
>  :bp=/products/LPRng/libexec/filters/lpbanner
>  :cm=Newark Lab - N217 - HP LinePrinter 2563A
>  :if=/products/LPRng/libexec/filters/lpf
>  :of=/products/LPRng/libexec/filters/lpf
>  :remote_support=R
>  :rm=ps1nwk
>  :rp=pr1
>  :sd=/var/spool/lpd/%P
>
> (also to ask my other question... if I want to make sure no non-text jobs
> are printed to this machine, but then on output run lpf, would I have the
> checking filter be the if and the lpf filter be the of, or does this have
> to be done some other way? -- here's a better question even. Does anyone
> currently have a filter that only allows text to print AND does CR/LF, so
> I don't have to write one? :))
>
> ---- _  _ _  _ ___  _  _  _
> |Y#| |  | |\/| |  \ |\ |  |  | Ryan Novosielski - Jr. UNIX Systems Admin
> |$&| |__| |  | |__/ | \| _|  | [EMAIL PROTECTED] - 973/972.0922 (2-0922)
> \__/ Univ. of Med. and Dent. | IST/ACS - New Jersey Medical School - C630
>

OK, you do the following:

a) set up this script

 #!/bin/sh
 type=`file - `;
 perl -e 'rewind(STDIN);'
 case "$type" in
        *text* ) break;;
        * ) /usr/bin/printf "Your print job is not a text file\n\r";
                exit 0;
                ;;
 esac 
 exec /products/LPRng/libexec/filters/lpf
 
This is basically how all the 'magic filters' do it.

Patrick

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to