1 |
>>>>> On Tue, 13 Mar 2007, Mike Frysinger wrote: |
2 |
|
3 |
> `type -p` is almost a complete drop in replacement for which ... |
4 |
> it does not work on bash builtins however, so people should use |
5 |
> `type -P` to force the PATH search |
6 |
|
7 |
> in other words, `type -p echo` would return "" while `type -P echo` |
8 |
> would return "/bin/echo" |
9 |
|
10 |
But in spite of this, "type -p" will still have the correct return |
11 |
value, so your first example remains valid: |
12 |
|
13 |
>> -if which foo 2>/dev/null ; then |
14 |
>> +if type -p foo > /dev/null ; then |
15 |
|
16 |
Ulrich |
17 |
-- |
18 |
gentoo-dev@g.o mailing list |