[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new redirection operator seems broken
From: |
Chet Ramey |
Subject: |
Re: new redirection operator seems broken |
Date: |
Thu, 12 Mar 2009 16:13:12 -0400 |
> Greg Wooledge <wooledg@eeg.ccf.org> writes:
>
> > On Thu, Mar 12, 2009 at 05:21:04PM +0100, Andreas Schwab wrote:
> >> Still does not fix this case:
> >>
> >> $ echo >&2 |& wc -l
> >>
> >> 0
> >
> > That looks like the correct output to me. When setting up a pipeline
> > with redirections, the pipeline happens first.
> >
> > The manual says your example should be equivalent to
> >
> > echo >&2 2>&1 | wc -l
>
> You are right, it works as documented. Still it looks counterintuitive.
I wonder if I should modify it so the implicit 2>&1 happens first, right
after the pipe, so any user-specified redirections can override it. That
doesn't seem that radical a change. Opinions? (I know what you think,
Andreas ;-) ).
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU chet@case.edu http://tiswww.tis.case.edu/~chet/
- new redirection operator seems broken, Matt, 2009/03/12
- Re: new redirection operator seems broken, Greg Wooledge, 2009/03/12
- Re: new redirection operator seems broken, Chet Ramey, 2009/03/12
- Re: new redirection operator seems broken, Andreas Schwab, 2009/03/12
- Re: new redirection operator seems broken, Greg Wooledge, 2009/03/12
- Re: new redirection operator seems broken, Andreas Schwab, 2009/03/12
- Re: new redirection operator seems broken,
Chet Ramey <=
- Re: new redirection operator seems broken, Greg Wooledge, 2009/03/12
- Re: new redirection operator seems broken, Chet Ramey, 2009/03/12
- Re: new redirection operator seems broken, Pierre Gaston, 2009/03/13