Redirecting Standard Error

Chapter 5 covered the concept of standard output and explained how to redirect a command's standard output. In addition to standard output, commands can send their output to another place: standard error. A command can send error messages to standard error to keep them from getting mixed up with the information it sends to standard output. Just as it does with standard output, the shell sends a command's standard error to the screen/window unless you redirect it. Unless you redirect one or the other, you may not know the difference between the output a command sends to standard output and the output it sends to standard error. This section covers the syntax used by the Bourne Again and Z Shells. See page 691 if you ...

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.