sh: fd redirections

Stephane Russell stephane.russell at prodigeinfo.com
Tue Dec 4 21:48:39 PST 2007


Hi,

I was testing a few things, and I was wondering if that behavior is normal:

$ exec 3>&1
$ echo toto >&3
toto
$ echo toto > /dev/fd/3
toto
$ exec 3>&-
$ echo toto >&3
toto
$ echo toto > /dev/fd/3
cannot create /dev/fd/3: Bad file descriptor

Why is >&3 ignores the redirection, but not /dev/fd/3? It seems to me
like a bug.

SR





More information about the Bugs mailing list