Matthias Klose wrote:
Bug#291197: "command -v" prints pathnames of non-executable files
Package: bash Version: 3.0-5 Severity: normal
Please consider the following sequence of commands which illustrates that "command -v foo" prints the name of the first executable file "foo" it finds on the PATH, failing which it prints the first non-executable file "foo" it finds on the PATH.
This is the standard bash behavior -- it mirrors the process followed when executing a command. (Attempting to execute a non-executable file if it's the only one in $PATH with a given name is historical sh behavior.) `type' and `command -v' do the same thing here.
The behavior you want is enabled when bash is in Posix mode, and is documented in the info manual.
Chet
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]