SUMMARY: redirect printer status output?

From: Jeff Kennedy <jlkennedy_at_amcc.com>
Date: Wed Dec 05 2001 - 11:38:32 EST
Thanks to:

Tim Evans	John Riddoch
Mark Bergman	Mark Neill

Everyone said that what I tried and/or variations on a theme should have
worked.  But the sad fact is that no variation I tried or that was
supplied worked.  I did try the (lp -d printer file) >&2 as well Mark,
still no joy.

However, after mentioning the issue to Ryan Anderson he pointed me to
something I should have noticed before, the man page for lp.  In there
you will notice a -s option.  Whooooooo doggies!  What a concept.  -s =
suppress.  

So, lp -s -d printer file gives no annoying request message.

Thanks.

~JK

Jeff Kennedy wrote:
> 
> There are reasons this script MUST remain a bourne shell script.
> Different shells are not an option so I am looking for how to do this in
> sh only.
> 
> Thanks.
> 
> Jeff Kennedy wrote:
> >
> > I am trying to redirect printer status output to stderr in a shell
> > script (sh).  From the csh command line I can successfully do
> >
> > lp -d printer file 1>&2
> >
> > So this may be csh specific I also tried
> >
> > lp -d printer file >&2
> > as well as
> > lp -d printer file >& 2
> >
> > both of which should work in sh.  I then tried
> >
> > lp -d printer file 1>$2
> >
> > No love.  My scripting book lists the 3rd version in I/O redirection but
> > .......
> >
> > How do I do this?       Thanks.

-- 
=====================
Jeff Kennedy
Unix Administrator
AMCC
jlkennedy@amcc.com
Received on Wed Dec 5 16:38:32 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:37 EDT