From owner-freebsd-questions Thu Sep 12 15:46:27 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 63A1E37B405 for ; Thu, 12 Sep 2002 15:46:20 -0700 (PDT) Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC56D43E72 for ; Thu, 12 Sep 2002 15:46:19 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g8CMkHqn136796; Thu, 12 Sep 2002 18:46:17 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: Date: Thu, 12 Sep 2002 18:46:16 -0400 To: Warren Block , FreeBSD-Questions@FreeBSD.ORG From: Garance A Drosihn Subject: Re: lpr Job Name Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) 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 At 8:20 PM -0600 9/11/02, Warren Block wrote: >Google shows that numerous people over the last few years have >wanted the ability to change the job name. > >I'm considering adding a -N option to lpr to set this. The first >problem I can see is that if the user prints multiple files >(lpr -Nmyjob file1 file2 file3), such a name option would be >questionable. Should it set the same name for each file? >Maybe only the first one? This is an interesting idea. I'm operating on very little sleep after a very long night, but let me think about this and see what I would suggest. >The question is: has anyone else got a better idea or a workaround? > >(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 A simple and mindless workaround would be to: someprog | cat > /tmp/$USER/NameIWant lpr -r -Pblah /tmp/$USER/NameIWant This could run into problems in some cases where an 'lpr -N' won't, and that skips over a few bells and whistles that you'd want. But I wrote it the way I did so that you'd see it's easy to write that (plus some bells and whistles) into a quick script. Call the script 'mylpr', and users could use it instead of the lpr command. -- 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