Redirection and Pipes

Most UNIX commands require input to produce output. The shell is responsible for setting up the defaults that a command can use for receiving input and sending output. We refer to this as standard input (stdin), standard output (stdout), and standard error (stderr), which are defined as follows:

  • Standard input The source for the command input. By default, the standard input is the keyboard.

  • Standard output The destination for the command output. By default, the standard output is the screen.

  • Standard error This is the destination for error messages. If a command produces errors, the errors are sent to standard error. By default, the standard error is the screen.

The shell enables you to change the values for standard ...

Get Inside Solaris™ 9 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.