Adrian May writes: > > ad@pub:~/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
