I can redirect stdout into a command redirection well enough:
$ ( echo stdout ; >&2 echo stderr ) > >( rev )
stderr
tuodts
but when I try to redirect stderr into a different one, it seems to go through the stdout channel:
$ ( echo stdout ; >&2 echo stderr ) > >( rev ) 2> >( cat )
tuodts
rredts
I can't use pipe because I want to keep the processing strictly separate:
$ ( echo stdout ; >&2 echo stderr ) 2> >(rev)
stdout
rredts
and this does weird things:
$ ( echo stdout ; >&2 echo stderr ) 2> >(rev) | cat -n
1 stdout
2 rredts
Am I misunderstanding how this should work?
(My actual goal is to have stdout and stderr go through two different tee processes, whilst remaining distinctly stderr and stdout for the existing consuming process.)
GNU bash, version 3.2.57(1)-release-(x86_64-apple-darwin15)