From owner-freebsd-questions Thu Sep 12 17:37:43 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1CAC37B400 for ; Thu, 12 Sep 2002 17:37:40 -0700 (PDT) Received: from wonkity.com (wonkity.com [63.93.4.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56CAE43E3B for ; Thu, 12 Sep 2002 17:37:40 -0700 (PDT) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost.wonkity.com [127.0.0.1]) by wonkity.com (8.12.1/8.11.6) with ESMTP id g8D0bauF047210; Thu, 12 Sep 2002 18:37:36 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.12.1/8.12.1/Submit) with ESMTP id g8D0bZ99047207; Thu, 12 Sep 2002 18:37:36 -0600 (MDT)?g (envelope-from wblock@wonkity.com) Date: Thu, 12 Sep 2002 18:37:35 -0600 (MDT) From: Warren Block To: Garance A Drosihn Cc: FreeBSD-Questions@FreeBSD.ORG Subject: Re: lpr Job Name In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 12 Sep 2002, Garance A Drosihn wrote: > >(These particular files are going to a network printer/copier that > >stores them. A user walks up to the printer, selects their jobs, > >and prints them. However, twenty files called "Standard input" > >really makes it difficult for them to prioritize. 8-) > > If they're named "standard input", then someone is doing: > someprog | lpr -Pblah Err...well, actually, the files have gone through one or more input filters (if=) that are piping them through things like enscript. I think lpr actually writes "stdin" to the N line in the control file when it doesn't have a file name. > 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-) 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 did hack in a quick -N flag to lpr, and--much to my surprise--it worked fine. Haven't looked at lpd yet. -Warren Block * Rapid City, South Dakota USA To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message