lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Luiz Henrique de Figueiredo <> writes:
>> It seems from 5.1 -> 5.2, the Lua copyright message for the
>> interpreter is now being sent to stdout instead of stderr:
>> I would think stderr is the appropriate place for such a message?
> The copyright message is not an error message.
> FWIW, gcc does the same thing:
> 	gcc --version >/dev/null
> prints nothing. So does GNU diff, curl, and probably many others.

Yeah, stdout is the "GNU standard" destination for --version, --help,
etc output.

The reason is that such output is explicitly requested by the user, so
it's more like "normal" output than error output.  This is also useful
in practice, as it makes it a little easier to process the output,
e.g. pipe --help output through a pager, pipe --version output through
"head -1", etc.


Custard, n. A vile concoction produced by a malevolent conspiracy of the hen,
the cow, and the cook.