Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2002 22:21:26 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Warren Block <wblock@wonkity.com>
Cc:        FreeBSD-Questions@FreeBSD.ORG
Subject:   Re: lpr Job Name
Message-ID:  <p05111702b9a6f1c5a0ef@[128.113.24.47]>
In-Reply-To: <Pine.BSF.4.21.0209121826280.47166-100000@wonkity.com>
References:  <Pine.BSF.4.21.0209121826280.47166-100000@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 6:37 PM -0600 9/12/02, Warren Block wrote:
>On Thu, 12 Sep 2002, Garance A Drosihn wrote:
>  > A simple and mindless workaround would be to:
>>           someprog | cat > /tmp/$USER/NameIWant
>>           lpr -r -Pblah /tmp/$USER/NameIWant
>
>Well, yes, although in a couple of newsgroups I think that would be
>nominated for a "useless use of cat". 8-)

Well, later I mentioned that "I wrote it that way, so you can see
that it's easy to make it a script".  That's what the 'cat' is for.
You would put the 'cat' into the script, so that you can use the
script exactly as you would use the lpr command...

The above script would work for anyone using 'someprog | lpr', but
it would have to be much fancier to work for all cases.  It was only
meant as a very quick workaround to the most significant issue that
you described.

>There's another issue: lpd doesn't feed the job name to an input
>filter.  If the input filter sends the job to another queue, the
>job name is lost.  For symmetry, lpd needs to add a -N parameter
>and job name to the parameters it sends to input filters.

I don't understand what you're saying here, but then I am very
tired and my brain isn't working right.  My proposed script does
not do anything with the -J parameter, it merely "sets" the 'N'
value by the trick of using a temporary file with the appropriate
name.

If input filters screw up the result of my script, then they will
screw up whatever is done to implement -N...

>I did hack in a quick -N flag to lpr, and--much to my surprise--it
>worked fine.  Haven't looked at lpd yet.

Er, sorry, I probably did a bad job saying what I wanted to say.  I
am the guy who works the most on lpr in freebsd, so I was talking
more about "how would I implement this for the official lpr?".  I
did not mean to imply that your proposed change would not work for
what you wanted.

If you noticed a lot of people who wanted a feature like this, then
we might as well think about doing it for everyone.  But before making
any changes to the official source, I wanted to think about it a bit.

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05111702b9a6f1c5a0ef>