[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash equivalent to DOS /p



on Fri, 16 Jul 2004 04:46:11PM -0400, Hendrik Boom insinuated:
> On Fri, Jul 16, 2004 at 03:58:41PM -0400, Nori Heikkinen wrote:
> > on Fri, 16 Jul 2004 01:46:30PM -0400, Hendrik Boom insinuated:
> > > 
> > > That works for regular output.  However, some programs also emit
> > > error messages onto stderr.  The above command will *not* redirect
> > > error messages into less, so they might mess up the pagination.
> > > To get error messages piped through less, use
> > > 
> > > 	command 2>&1 | less
> > 
> > dude! i've been trying to do that for months.  tahnks!
> > 
> > as an aside, did /p in DOS redirect stderr, too?  it's been so long
> > ...
> 
> Well, I'm glad I posted -- I nearly didn't -- it seemed too well-known.
> But then I thought, piping to less is well-known, too.

well, it is well-known, but i somehow always get the order of the
ampersands and redirection >s messed up.  why, for exapmle, is there a
'&' in front of the '1' there, but not the '2'?

</nori>

-- 
    .~.      nori @ sccs.swarthmore.edu
    /V\  http://www.sccs.swarthmore.edu/~nori
   // \\          @ maenad.net
  /(   )\       www.maenad.net/jnl
   ^`~'^
  
++     Sponsor me as I run my SECOND marathon for AIDS:       ++
++ http://www.aidsmarathon.com/participant.asp?runner=DC-2844 ++

Attachment: pgpqrT0_vLz6T.pgp
Description: PGP signature


Reply to: