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

Glenn Fowler gsf at research.att.com
Thu Dec 6 20:09:33 PST 2007


On Thu, 6 Dec 2007 22:33:42 -0500 David Korn wrote:
> > > ... 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.

so Roland, is there a specific case where an alias.sh test fails for
	PATH=/usr/xpg4/bin:/usr/bin
but works for
	PATH=/usr/bin
?

I just tried the alias test both ways on sol11.sun4 and it passed both ways

-- Glenn Fowler -- AT&T Research, Florham Park NJ --



More information about the ksh93-integration-discuss mailing list