The shell syntax for opening a file for writing and using its file descriptor is:
With bash and zsh you also can write:
Thus, later in your script you can redirect output like this:
generate-partx >&3 generate-partx >&13
And to close them:
exec 3>&- exec 13>&-
The original ksh (tested 88 and 93) only seems to support file descriptor numbers 0 to 9 with that syntax.
Sure, one could argue that 10 open file descriptors should be enough for everyone and/or that nobody is using ksh anymore.
But sometimes it is not and you are.
Thus, my question: How to open more than 10 file descriptors in a ksh script?