[ksh93-integration-discuss] [Bug 399] New: "alias.sh" may execute the wrong command

David Korn dgk at research.att.com
Thu Dec 6 19:33:42 PST 2007


Subject: Re: [ksh93-integration-discuss] [Bug 399] New: "alias.sh" may execute  the wrong command
--------

> > ... if PATH is /usr/xpg4/bin:/usr/bin, a "ls" builtin is bound to /usr/bin/ls
> > and the script should execute the "ls" builtin it will execute /usr/xpg4/bin/ls
> > instead of the builtin command because /usr/xpg4/bin comes before /usr/bin in
> > PATH.
> > 
> > 

I must be missing something.  If ls is a builtin for /usr/bin/ls
but /usr/xpg4/bin comes before /usr/bin in PATH, then ls should run
/usr/xpg4/bin/ls, not the built-in version of /usr/bin/ls.

That is the whole point of binding a builtin to a path name rather than
just making ls a builtin.

David Korn
dgk at research.att.com


More information about the ksh93-integration-discuss mailing list