Some might find this trivial, but it was not trivial to me. If you want to print something to stderr in a shell script, you can redirect the output of a command (eg.
echo) to this stream (file handle or whatever):
echo "text" >&2
I've used the stderr->stdout redirection for ages (I mean:
command 2>&1), but somehow I did not make the jump from this syntax to the one I was looking for right now.
Thanks to airwin for helping me out with this.
Recent comments
1 day 20 hours ago
1 day 20 hours ago
4 days 20 hours ago
4 days 22 hours ago
6 days 15 hours ago
6 days 16 hours ago
1 week 1 day ago
1 week 4 days ago
2 weeks 4 days ago
2 weeks 4 days ago