"Jeff Chua" <[EMAIL PROTECTED]> writes: > On 5/9/07, Juergen Keil <[EMAIL PROTECTED]> 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.
You want "type -p". Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."