Glenn Golden <g...@zplane.com> writes:
> 2c: How about just adding a brief "NOTE" (or "CAVEAT") section to echo.1,
> explicitly addressing the wart and advocating for printf(1) as well?
>
> -----------------------------------------------------------------------------
> NOTE
>   For historical and back-compatibility reasons, certain bare option-like
>   strings cannot be emitted without setting POSIXLY_CORRECT, and the bare
>   string '-n' cannot be emitted at all.  Prefixing or suffixing such strings
>   with quoted whitespace (e.g. ' -n') can be used as a workaround for this
>   peculiarity.  More generally, printf(1) is recommended as a more modern
>   and flexible replacement for tasks historically performed by echo(1).
> -----------------------------------------------------------------------------
>
> Something like this seems to get the job done: Briefly states the issue,
> why it exists, provides a workaround, and cheerleads for modernization.

That is great. I would love to see this note in echo's man page.

Regards,
Florent

Reply via email to