This question is old, but you could do this, which facilitates reading: >&2 echo "error" The operator '>&2' literally means redirect the address of file descriptor 1 (stdout) to the address of file descriptor 2 (stderr) for that co…
Posted: 2009-04-28 15:20 Tags: Python Note Much of the "What Happens When you Execute a Command?" is based on information in http://en.wikipedia.org/wiki/Redirection_(computing) so go there for the latest version. This post is released under the…
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.…