Making curl send errors to stderr and everything else to stdout

Try this:

# No error messages because it succeeds.
curl  http://www.shikadi.net/        --fail --silent --show-error

# This prints an error message to stderr
curl  http://i.like.you.def.maybe/   --fail --silent --show-error

Thanks to Russell Davis’s answer on this page, man curl, and trial and error.
For the curious, here is the wget version of the question: https://superuser.com/questions/420120/wget-is-silent-but-it-displays-error-messages

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)