David Korn
2014-10-19 01:27:25 UTC
Bug #854: requirement for additional built-in utilities to be searched
for via $PATH wasnot and is not existing practice OPEN
http://austingroupbugs.net/view.php?id=854
Action: Andrew to ask David Korn to comment on this bug and the previous
emailhttp://austingroupbugs.net/view.php?id=854
Action: Andrew to ask David Korn to comment on this bug and the previous
discussion of the issue (seq 21270).
Action repeated - a followup was sent to David.
I don't remember getting e-mail about this so maybe you sent it to myAction repeated - a followup was sent to David.
research.att.com
address which I no longer have now that I am at Google, not AT&T.
Anyway, I learned early on that you create compatibility problems when you
make a standard utility built-in since there built-ins are run before doing
a PATH search. For example if grep is a builtin, but I want to use a much
faster version of grep that is in say /usr/fast/bin/grep, I can't do
PATH=/usr/fast/bin:$PATH to run the script and get the fast version of grep.
However, I like the idea of having built-in versions of standard utilities
so what I did in ksh is to allow a builtin to be associate with a path so
that I can have a built-in /bin/grep that will be invoked whenever a path
search would have found /bin/grep on PATH. This way, I have control
whether the built-in version is used or not and yet can have builtin
versions of utilities.
Doing it this way preserves compatibility.