I'm trying to follow the bash advanced scripting guide and use an additional (output) file descriptor. I'm running:
3>/tmp/foo
echo hello >&3
but instead of this putting "hello" in /tmp/foo
, I get the error:
bash: 3: Bad file descriptor
Why is that?
Note: In case it matters, I'm using bash 4.4.