On 12/11/2013 22:53, Piotr Grzybowski wrote:
Yuri: I have verified that under linux 3.2.0, bash-4.2.25, nothing of
the sort takes place. tee gets/dev/fd/${somefd}, why it is not
supported in bsd kernel i have no idea, but I thought it was. I've
even built mplayer and run your script (btw. probably there is an
easier way of doing what you want), I also performed some tests with
command that actually outputs what grep looks for. Also please note
that `command substitution`, or $(command substitution) is slightly
different from >(process substitution).
Piotr,
/dev/fd/{somefd} is quite an advanced feature, and it can be/has been
argued that it can lead to unpredictable behavior when file descriptors
appear/disappear. So FreeBSD only implements fds 0,1,2. Even those can
be closed too.
There are some other systems without such feature, and bash should be
fixed to work fine without it.
Yuri