Should the command line “usage” be printed on stdout or stderr?
Never thought about it, but why not write the usage instructions to stderr if the program was called with no or wrong arguments, and write it to stdout when called with a –help (or similar) argument? This way, if the usage is shown because of an error, it goes to stderr, and if it’s not … Read more