简体   繁体   中英

Why does wget output to stderr rather than stdout?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM