[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug? "type -P xxx" returns "xxx" that isn't executable...(or readable)
From: |
Linda Walsh |
Subject: |
bug? "type -P xxx" returns "xxx" that isn't executable...(or readable) |
Date: |
Wed, 30 Jul 2014 17:18:53 -0700 |
User-agent: |
Thunderbird |
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
- bug? "type -P xxx" returns "xxx" that isn't executable...(or readable),
Linda Walsh <=