Re: new redirection operator seems broken

2009-03-13 Thread Pierre Gaston
On Thu, Mar 12, 2009 at 10:13 PM, Chet Ramey wrote: > 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 ;-) ). If

Re: new redirection operator seems broken

2009-03-12 Thread Chet Ramey
Greg Wooledge wrote: > On Thu, Mar 12, 2009 at 04:13:12PM -0400, Chet Ramey wrote: > $ echo >&2 |& wc -l > >> 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 cha

Re: new redirection operator seems broken

2009-03-12 Thread Greg Wooledge
On Thu, Mar 12, 2009 at 04:13:12PM -0400, Chet Ramey wrote: > > >> $ echo >&2 |& wc -l > 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 wh

Re: new redirection operator seems broken

2009-03-12 Thread Chet Ramey
> Greg Wooledge 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 fi

Re: new redirection operator seems broken

2009-03-12 Thread Andreas Schwab
Greg Wooledge 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 s

Re: new redirection operator seems broken

2009-03-12 Thread Greg Wooledge
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

Re: new redirection operator seems broken

2009-03-12 Thread Andreas Schwab
Chet Ramey writes: >> On Wed, Mar 11, 2009 at 09:50:18PM -0400, m...@ice.filescope.com wrote: >> >rm 2>&1 | grep --color op >> >rm |& grep --color op >> > >> >Notice that they are behaving differently. >> >> Confirmed in 4.0.0 and 4.0.10: > > Interesting. Only for n

Re: new redirection operator seems broken

2009-03-12 Thread Chet Ramey
> On Wed, Mar 11, 2009 at 09:50:18PM -0400, m...@ice.filescope.com wrote: > > rm 2>&1 | grep --color op > > rm |& grep --color op > > > > Notice that they are behaving differently. > > Confirmed in 4.0.0 and 4.0.10: Interesting. Only for non-builtin simple commands a

Re: new redirection operator seems broken

2009-03-12 Thread Greg Wooledge
On Wed, Mar 11, 2009 at 09:50:18PM -0400, m...@ice.filescope.com wrote: > rm 2>&1 | grep --color op > rm |& grep --color op > > Notice that they are behaving differently. Confirmed in 4.0.0 and 4.0.10: imadev:~$ rm 2>&1 | tr '[:lower:]' '[:upper:]' USAGE: RM [-R

new redirection operator seems broken

2009-03-11 Thread Matt
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: i686-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/loc