[patch] bug #7 -- which(1) is b0rked

Paul Fox pgf at brightstareng.com
Wed Aug 31 13:06:59 UTC 2005

 > Hi,
 > http://bugs.busybox.net/view.php?id=7
 > sizes are inlined in the patch.
 > PS: please see the bug-comment wrt '::' and let me know if i should deal
 > with it or not.

i've added a note to the bug, which bernhard has probably seen by
now, but for the list:  the issue is that "which" doesn't treat
empty directories in $PATH as the current directory, and
therefore won't always find executables that the shell would
find.  PATH has always been interpreted this way by /bin/sh, as
well as by bash.  (though the man page doesn't say so -- that's a
serious omission, in my opinion).

is equivalent to:

is equivalent to:

(and of course a trailing ':' puts current directory last.)

 paul fox, pgf at brightstareng.com

More information about the busybox mailing list