Date: Fri, 13 Sep 2002 06:57:26 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Roman Neuhauser <neuhauser@bellavista.cz> Cc: Garance A Drosihn <drosih@rpi.edu>, FreeBSD-Questions@FreeBSD.ORG Subject: Re: lpr Job Name Message-ID: <Pine.BSF.4.21.0209130649450.49045-100000@wonkity.com> In-Reply-To: <20020913083354.GN45289@freepuppy.bellavista.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0209130649450.49045-100000>
