Why does wget output to stderr rather than stdout?

非 Y 不嫁゛ 提交于 2019-12-09 15:07:56

问题


After 30mins of futile attempt to capture the output of wget, I figured out that the program writes to stderr rather than the stdout. Searching in web and stack-overflow reveals this to be a well-known fact.

Any idea why is this so?


回答1:


It's well known, because it's in the manual.

Reporting messages on stderr is common, because messages are separated from regular output on stdout. This is useful when you combine several tools with a pipe. In this case it would be bad, when regular output and diagnostic messages were mixed up.



来源:https://stackoverflow.com/questions/13066518/why-does-wget-output-to-stderr-rather-than-stdout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!