stdout vs stderr
Debate on proper use of stdout for data output versus stderr for errors, logs, and info in Unix CLI tools, covering piping, buffering, TTY detection, and best practices.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Any screenshots of what it does with stderr?
That would be stderr but hell yes
That's true of stderr output. You should be able to parse stdout though - otherwise how are you meant to use piping etc
Some tools adjust their output based on it going to a terminal or not. Try 'ls' versus 'ls | cat'.
Maybe there should be a stdad so it won't be mixed in with the data going to stdout.
Surely the title of the post and article should say “… redirect stdout …” ?
stderr instead of stdout is silly.
Why should polluting stderr be seen as any better than polluting stdout?
it also makes sense for stdout, e.g. when you're spewing binary data that might corrupt a terminal.
Is that not why you have stderr?