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.
本文共 200 字,大约阅读时间需要 1 分钟。
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.
转载地址:http://snhbm.baihongyu.com/