O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

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

STDERR

STDERR is another output stream beyond STDOUT, and it's like that for a good reason. You want the two data streams separated. We already covered STDOUT; it is the first. The second, STDERR, stands for standard input error. STDERR is the output stream that error messages are sent to in Unix. This is commonly the end user's terminal.

If the user is redirecting STDOUT and the program can only put errors on STDOUT, the user might never see the errors that all go into the redirected file. Instead, programs can use STDERR for errors. If the user has not redirected it, then he can still see error messages and warnings while STDOUT is headed into another file or program.

If you want to put STDERR into the same file in which you're storing STDOUT, ...

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