Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: multios doesn't work with 2>&1



Bart Schaefer wrote:
> If I back out workers/20666 (Jan 2005), then this example works again.

(This is really a zsh-workers thing, too, so I've moved it.)

Crikey, I'd worked out it was already broken in 2007 and I thought I was
doing well...

Playing around here, the other observation I have before looking at the
thread you're talking about is that

echo foo 2>&1 >/dev/null > >(sed 's/foo/bar/')
echo foo >/dev/null 2>&1 > >(sed 's/foo/bar/')
echo foo >/dev/null > >(sed 's/foo/bar/') 2>&1

all work as expected.  This seems inconsistent --- the synchronous /
asynchronous and run-in-shell / fork behaviour is clearly different in
that case, but it's not clear that should affect redirection.

(I'd also worked out that

echo foo >/dev/null 2>&1 | sed 's/foo/bar/'

gives a different bad effect, namely you get the output you want but the
shell hangs, but that maybe another natural consequence of the thread I
haven't read yet.)

pws



Messages sorted by: Reverse Date, Date, Thread, Author