bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH] Adding support for '--' in builtin echo's option parsing.


From: Bob Proulx
Subject: Re: [PATCH] Adding support for '--' in builtin echo's option parsing.
Date: Mon, 1 Apr 2013 11:46:15 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Hemmo Nieminen wrote:
> Description:
>         Currently it seems to be impossible to e.g. print "-n" with
>         the builtin echo witout any extra characters.

Correct.  That is the long standing legacy behavior.  The behavior was
pervasive and non-portable during many years and the existing widely
spread behavior was since standardized by POSIX.

  http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html

>         The attached patch makes the builtin echo to interpret '--'
>         as the end of options.

Thanks for the submission but I am sorry that it cannot be used.
Changing the behavior of echo in this way would cause it to break many
scripts and programs that rely upon the previous legacy behavior.

For portable use it is recommended to use printf.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]