On 5/9/07, Andreas Schwab <[EMAIL PROTECTED]> wrote:
"Jeff Chua" <[EMAIL PROTECTED]> writes:

> "which" returns the first path, "type" returns all paths.

You want "type -p".

# type awk
awk is /bin/awk
awk is /usr/bin/awk
# type -p awk
/bin/awk
/usr/bin/awk
# type foo
-bash: type: foo: not found
# type -p foo
#

Interesting. "type -p foo" does the same as "type foo 2>/dev/null",
but only if "foo" is not found. Tried that on "awk" above, and it
prints the paths.

Thanks,
Jeff.


Reply via email to