Standard Input and Standard Output
The standard output is a place that a program can send information, such as text. The command (program) never “knows” where the information it sends to standard output is going (Figure 5-3). The information can go to a printer, an ordinary file, or your screen. The following sections show that, by default, the shell directs standard output from a command to the screen[4] and describe how you can cause the shell to redirect this output to another file. Standard input is a place that a program gets information from. As with standard output, the command never “knows” where the information came from. The following sections also explain how to redirect standard input to a command so that it comes from an ordinary ...
Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.