O'Reilly logo

Practical UNIX by Steve Moritsugu - DTR Business Systems

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using a File to Save Command Input or Output (Redirection)

Every UNIX command has access to three standardized channels for doing simple input, output, and error messages:

  • I/O channel 0: standard input (stdin)

  • I/O channel 1: standard output (stdout)

  • I/O channel 2: standard error (stderr)

Usually all UNIX commands display their results using the standard output routine supplied by the system. Commands display any error messages using the standard error routine. They get their input via standard input. These standard output routines are written in such a way that it is easy for the shell to redirect the output to a file or pipeline instead of to the screen. Similarly, it is easy to redirect input to come from a file or pipeline instead of the keyboard. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required