STDOUT

STDOUT stands for standard output. STDOUT is the output connection that Unix provides for programs. Just as you can redirect STDIN from a file, if you want to send the output of a command to a file, then you can redirect STDOUT. The > character directs the STDOUT of the program to its left into the contents of the file to its right. In our same example, we look at using the cat command to copy the contents of one file to the contents of another. Commonly, as you saw with cat, used with no argument, its default output was to echo the command back to the terminal. The standard input was the keyboard. Now, the STDOUT has been altered. We learned in the last example that the input (STDIN) was changed to testfile1. Now the standard output (STDOUT) ...

Get SAMS Teach Yourself Unix in 10 Minutes 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.