bash: Open a file descriptor for reading.
-
Take into account the main readme for this section. README first.
Commonly used file descriptors are 0, 1, 2, but other file descriptors can be used to read or write to.
The file oneworld has the following text:
One nation under a groove
Read from file descriptor 3. Now file descriptor 3 has the content of the file oneworld.
$ exec 3< oneworld
Confirm file descriptor has the contents of the file oneworld.
$ cat <&3 One nation under a groove
© Lightnetics 2024