When a program runs, it automatically has three input/output streams opened for it; one for input, one for output, and one for error messages. Typically, these are attached to the user’s terminal (so they take input from or give output to the command line), but they can be directed elsewhere, such as to or from a file. These three streams are referred to and abbreviated as shown here:
Each of these is assigned a number, shown in the third column.
In the “Redirecting Output and Input” section, you learned how to redirect input and output without needing to know about
stdout. You can also redirect ...