echo输出到stderr

echo "Your error message here" >&2

This is a normal echo (which goes to stdout), however the >&2 (which is shorthand for 1>&2), means 'mix the stdout to the stderr'. 1 is stdout, and 2 is stderr here.

posted @ 2015-10-11 15:41  emanlee  阅读(942)  评论(0编辑  收藏  举报