home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!howland.reston.ans.net!paladin.american.edu!gatech!rpi!night
- From: night@acm.rpi.edu (Trip Martin)
- Newsgroups: gnu.misc.discuss
- Subject: Re: ftp site for the unix WHICH command
- Message-ID: <b2j3wlf@rpi.edu>
- Date: 21 Jan 93 16:54:23 GMT
- References: <nazari.727564365@kraft.ecn.purdue.edu> <FRIEDMAN.93Jan20183002@nutrimat.gnu.ai.mit.edu> <BAS.93Jan21132945@carlo.phys.uva.nl>
- Reply-To: night@acm.rpi.edu
- Distribution: na
- Lines: 21
- Nntp-Posting-Host: hermes.acm.rpi.edu
-
- In <BAS.93Jan21132945@carlo.phys.uva.nl> bas@phys.uva.nl (Bas de Bakker) writes:
-
- >>>>>> On 20 Jan 93 18:30:02, friedman@gnu.ai.mit.edu (Noah Friedman) said:
-
- >nf> Personally, I would advise against using `which'. It is
- >nf> [t]csh-centric and does *bad* things by deliberately sourcing your
- >nf> .cshrc (this is a value judgement and I'm not going to waste time
- >nf> defending my position---just accept that I think it's bad).
-
- >The sourcing part is horrible indeed. Nevertheless, I use 'which'
- >quite often as it's a zsh builtin. It simply looks in the command hash
- >table.
-
- I wrote a shell function to replace the command which because the command
- was so slow (at least on the machines I use). Here it is for anyone that's
- interested:
-
- which() { IFS=:$IFS; for d in $PATH; do test -f $d/$1 && echo $d/$1 && break; done ;}
- --
- Trip Martin
- night@acm.rpi.edu
-