On 8/18/14, 9:34 PM, Peng Yu wrote:
> Hi,
>
> The following shows that echo does not following the "getopt"
> convection. Is it better to make all bash internal command following
> the getopt convention?
As others have responded, `echo' is exempt from following the getopt
rules.
Congratulations
On 08/18/2014 07:34 PM, Peng Yu wrote:
> Hi,
>
> The following shows that echo does not following the "getopt"
> convection. Is it better to make all bash internal command following
> the getopt convention?
No, that would break backward compatibility.
>
> ~$ echo -n
> ~$ echo -n -n
> ~$ echo -n
Peng Yu writes:
> The following shows that echo does not following the "getopt"
> convection.
POSIX requires that:
The echo utility shall not recognize the "--" argument in the manner
specified by Guideline 10 of XBD Utility Syntax Guidelines; "--"
shall be recognized as a string op
Hi,
The following shows that echo does not following the "getopt"
convection. Is it better to make all bash internal command following
the getopt convention?
~$ echo -n
~$ echo -n -n
~$ echo -n -- -n # I think that the output should just be "-n" not "-- -n".
-- -n~$
http://software.frodo.looijaa