[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: /bin/echo -- $var
From: |
Harald Dunkel |
Subject: |
Re: /bin/echo -- $var |
Date: |
Thu, 15 Aug 2019 09:36:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 8/14/19 3:10 PM, Eric Blake wrote:
On 8/14/19 7:01 AM, Harald Dunkel wrote:
Shouldn't it be just
-n
No, because 'echo' is one of the few exceptions to the rule, in that
POSIX specifically mandates that it NOT recognize -- as an
end-of-options marker.
But then the "-n" shouldn't be printed either, should it? "-n"
is a valid command line option for coreutil's /bin/echo (and
the bash builtin, too).
This doesn't seem reasonable. Posix says also "Implementations
shall not support any options", i.e. coreutil's echo is violating
Posix, anyway.
Regards
Harri
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html