To print the file, the first
cat has to read it until the end.
exec 6< input.txt causes the shell to hold the file descriptor until the
shell dies or closes it, so the file offset still points to the end of the
file when the second
cat is invoked, which thus writes nothing to stdout.
If on a Linux-based system, you can see that happening by peeking into the file descriptor info:
echo "File contents" > input.txt
exec 6< input.txt
If you execute that script, you will get something like
confirming that the offset (
pos) is not 0
when the second
cat is executed, but instead points to its end.
To reset the offset, you can add another
exec 6< input.txt in between the