|
From: | Jeff Chua |
Subject: | Re: [Qemu-devel] [PATCH] configure |
Date: | Wed, 9 May 2007 17:18:51 +0800 |
On 5/9/07, Juergen Keil <address@hidden> wrote:
Isn't the use of "which" wrong, anyway? "which" belongs to csh/tcsh, and tells you about csh's/tcsh's idea about a command or a csh command alias. IMO, for a /bin/sh (or bash) script, using the "type" command would be a better idea.
"which" returns the first path, "type" returns all paths. # type awk awk is /bin/awk awk is /usr/bin/awk # which awk /bin/awk # type foo -bash: type: foo: not found Either way would work, but even with "type", it still needs to be "type foo 2>/dev/null". Thanks, Jeff.
[Prev in Thread] | Current Thread | [Next in Thread] |