[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug? "type -P xxx" returns "xxx" that isn't executable...(or readabl

From: Mike Frysinger
Subject: Re: bug? "type -P xxx" returns "xxx" that isn't executable...(or readable)
Date: Fri, 01 Aug 2014 06:07:38 -0400
User-agent: KMail/4.13.1 (Linux/3.14.2; KDE/4.13.1; x86_64; ; )

On Thu 31 Jul 2014 23:40:18 Linda Walsh wrote:
> Chet Ramey wrote:
> > type -P echo
> > 
> > ls -l $(type -P echo)
> > 
> > 
> > If you already have `echo' in the command hash table, type -P will return
> > it, since that's what the shell will attempt to execute.
> ---
>       It's not in the hash table, but type -P still
> returns the non-executable.

read what Chet said.  type -P reflects what the shell will attempt, not what 
is useful.  the fact that it's not usable is irrelevant.

if you want to see if it's executable, use `[ -x ... ]`.

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]