From owner-freebsd-questions Fri Sep 13 5:57:34 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 15DB137B400 for ; Fri, 13 Sep 2002 05:57:33 -0700 (PDT) Received: from wonkity.com (wonkity.com [63.93.4.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F8EB43E65 for ; Fri, 13 Sep 2002 05:57:32 -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 g8DCvRuF049076; Fri, 13 Sep 2002 06:57:27 -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 g8DCvQ3K049073; Fri, 13 Sep 2002 06:57:27 -0600 (MDT)?g (envelope-from wblock@wonkity.com) Date: Fri, 13 Sep 2002 06:57:26 -0600 (MDT) From: Warren Block To: Roman Neuhauser Cc: Garance A Drosihn , FreeBSD-Questions@FreeBSD.ORG Subject: Re: lpr Job Name In-Reply-To: <20020913083354.GN45289@freepuppy.bellavista.cz> 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 Fri, 13 Sep 2002, Roman Neuhauser 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 > > actually, that snippet is a UUCA nominee because the cat there is > completely useless. someprog > /tmp/$USER/NameIWant would work just > as well. Actually, it isn't. It took me a bit to see what Garance was talking about. ">" isn't a command; you can't start a script with it, so you need the cat to provide something to redirect: #!/bin/sh # redirect stdin to a named file cat > /tmp/$USER/NameIWant # print and remove named file with lpr lpr -r -Pblah /tmp/$USER/NameIWant Output can then just be piped to it. -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