Summary

In this lesson, you were introduced to the Unix model of processing input and output, standard I/O, STDIN, STDOUT, STDERR, as well as piping. Here's a review of some of the key points:

  • Every program has a STDIN, a STDOUT, and a STDERR. Not all programs use them for user interaction (programs such as Photoshop just don't lend themselves to command-line control), but for the vast majority that do, these input and output connections can be manipulated.

  • You can provide the input data that a program expects on STDIN by hand, from a file, or from another program.

  • You can send the STDOUT and STDERR of a program into a file if you want to collect it for future use rather than viewing it as it is produced.

  • You can pipe the STDOUT of one program into ...

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.