bug-coreutils
[Top][All Lists]
Advanced

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

bug#11246: Is this a bug in tee?


From: Alan Curry
Subject: bug#11246: Is this a bug in tee?
Date: Sun, 15 Apr 2012 17:39:47 -0500 (GMT+5)

Adrian May writes:
> 
> address@hidden:~/junk$ echo abcde | tee >(tr a 1) | tr b 2
> a2cde
> 12cde
> 
> I'd have expected 1bcde instead of 12cde. It seems like the tr b 2 is
> acting early on the stream going into tr a 2.
> 
> This is a ubuntu server 10.04 machine.
> 
> Adrian.
> 

The shell sets up the pipeline, and your shell is doing it stupidly. With
zsh, you'd get the correct result:

% echo abcde | tee >(tr a 1) | tr b 2
a2cde
1bcde

ksh and bash recently copied the process substitution feature from zsh, and
they haven't got it right yet.

-- 
Alan Curry





reply via email to

[Prev in Thread] Current Thread [Next in Thread]