Greg Wooledge <wool...@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.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Reply via email to