echo that outputs to stderr

Posted by BCS on Stack Overflow See other posts from Stack Overflow or by BCS
Published on 2010-06-07T14:36:16Z Indexed on 2010/06/07 14:52 UTC
Read the original article Hit count: 117

Filed under:

Is there a standard bash tool that acts like echo but outputs to stderr rather than stdout?

I know I can do echo foo 1>&2 but it's kinda ugly and, I suspect, error prone (e.g. more likely to get edited wrong when things change).

© Stack Overflow or respective owner

Related posts about bash