4 ms·
stderr instead of stdout is silly.
by thrwyoilarticle 5y ago
stderr instead of stdout is silly.
- oshiar53-0 5y agoOn the contrary, printing the easter egg to stdout would have made it be recognized as part of the legitimate output. Here, "gimme gimme gimme" is not a valid manpath at all. This might have led to a even more subtle issue that is harder to debug, as the consumer tries to interpret gimme as a path to man pages.
- globular-toast 5y agoWhy? Stderr is meant to be a secondary "messy" output stream mainly for human consumption. The name is wrong. It should just be "output2". If the original poster on SO had correctly used stdout and ignored stderr, this would never have been a problem.
- andrewmcwatters 5y agoI thought about this recently, too, but it’s “correct” behavior. Imagine you’re running curl. Do you want it’s progress in stdout when you’re piping it? No. You want the output, and you shouldn’t have to use —silent to get only that.
- thrwyoilarticle 5y agoGimme gimme gimme is the output. IMO the joke making it obviously different is better than the joke making it subtly different. Imagine how annoying it would be if it only had a 1 in 100 chance to happen, for instance.