i wrote:
||>> $ >/tmp/foo
||>> $ PATH=/tmp:$PATH bash -c 'command -v foo'
||>> /tmp/foo
||>> $ >/tmp/ls
||>> $ PATH=/tmp:$PATH bash -c 'command -v ls'
||>> /usr/bin/ls
||>
||> Boo-ho!! To me this looks like a bug in bash and dash
...
|In the meanwhile i have found out that bash does not find that
|when POSIXLY_CORRECT is set, and will adjust the stuff
|accordingly.
|
||autoconf's ./configure here does
||
|| test -f "$1" && test -x "$1"
||
||rather than command(1).
|
|The full fix would be to iterate over $PATH from left to right and
|find something really executable. I think that is even better.
Will be in v14.9.4 as ({make-config,cc-test}.sh: no command -v
(Norman Ramsey, Ralph Corderoy)!..)
..
|Thanks for the digging, Ralph, and for the reporting, Norman!
Ciao!
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)