Was comparing /contrasting output of "which" with output of "type -[pPa]"
(trying all 3) with the intent of being able to turn which into an alias, since
it returned incorrect info for "builtins, aliases and functions" -- because
it is a separate program.

While "which" returns "not found in path when I turn off the exec
bits for "echo", bash still returns the first copy of the file in my
path -- executable or not.

Shouldn't it only be returning the first *executable* version of
what is found (if anything?)

... i.e.
 type -P echo
/usr/bin/echo
 \ls -l /usr/bin/echo
 cat /usr/bin/echo
cat: /usr/bin/echo: Permission denied
 \ls -l /usr/bin/echo
-rw------- 2 root root 136753 Nov 19  2013 /usr/bin/echo



Reply via email to