which script

Jeremy Huntwork jhuntwork at linuxfromscratch.org
Thu Nov 17 10:30:39 PST 2005


Hi Guys:

I have a question. The which script provided as an alternative to Gnu 
Which uses the syntax:

type -pa | head -n 1 ...

My question is, why do we pipe it through head so we can choose only the 
first occurence when 'type -path' does the same thing?  If it's a 
portability thing, that doesn't seem to make sense because we specify 
#!/bin/bash. Also, I don't know much of bash's history, so is it 
possibly because this is a new feature?

--
JH



More information about the blfs-dev mailing list