The following correctly prints "fd=2":
coproc p { head -1; }
2>&${p[1]} bash -c 'echo fd=2 >&2'
cat <&${p[0]}
Change 2 to 3, throws error: "bash: 3: Bad file descriptor":
coproc p { head -1; }
3>&${p[1]} bash -c 'echo fd=3 >&3'
cat <&${p[0]}
I'm not very familiar with redirection, so I may have overlooked
something obvious...
What am I missing?
