Re: "echo" does not follow the "getopt" convention

2014-08-19 Thread Chet Ramey
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

Re: "echo" does not follow the "getopt" convention

2014-08-19 Thread Eric Blake
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

Re: "echo" does not follow the "getopt" convention

2014-08-19 Thread Andreas Schwab
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

"echo" does not follow the "getopt" convention

2014-08-19 Thread Peng Yu
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