Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"special built-in utilities" are specifically listed elsewhere. echo is not among them:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3...



A lawyerly reading still permits echo to qualify as a special built-in utility.

Two relevant excerpts: "The following "special built-in" utilities shall be supported in the shell command language ..."

"... The term "built-in" implies that the shell can execute the utility directly and does not need to search for it. An implementation may choose to make any utility a built-in; however, the special built-in utilities described here differ from regular built-in utilities ..."

(the two differences are irrelevant to this discussion as they do not mention PATH resolution behaviors)

These quotes taken together do not preclude the shell adding a built-in utility and assigning it the "special" status. The standard does not say that only the listed utilities are special; it says that the listed utilities shall be special. Adding a normal built-in utility (not "special") not on the list is explicitly condoned.

It is my belief that echo being a "special built-in utility" and thus having magic PATH behavior is POSIX compliant, although the standard is not 100% clear on this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: