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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access