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

Re: No 'which' program?



> Frank Neumann writes:
>> Hi,
>> I might be wrong, but from looking at the 'Contents' file, I have not yet
>> seen a 'which' program for Debian. I find it pretty useful sometimes,
>> as in 
>> $ ldd `which <some_program>`
> 
> Both tcsh and bash supply their own 'which' built-in commands, bash's is
> just called type. alias which to 'type -p' if you want it to act exactly
> like which.

Zsh too has a built-in `which' command.

It also has an interesting globbing mechanism whereby `=program' is
substituted with the full path to the program, so that:

  ldd =some_program

is the equivalent of saying:

  ldd `which some_program`

Mighty convenient, IMHO. There are lots of other reasons why I like zsh, but I
suppose this isn't the best place to start a shell war. E-mail me personally
if you want to hear more.

-- 
Robert Leslie
rob@mars.org


Reply to: