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.
echo输出到stderr
阅读 39
2023-11-06
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.
相关推荐
精彩评论(0)