🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #63029

Re: Where is "which"?

#63029
From: Martin Cracauer
Date: Wed, 15 Mar 1995 15:43
21 lines
1803 bytes
This is my own `which'. It's advantage is that `hidden' executables
are shown, too. For example, on my machine `cwhich make` gives:

-rwxr-xr-x    1 cracauer public    618080 Dec  7 11:32 /usr/local/bin/make
-rwxr-xr-x    1 root     sys       123064 Apr 11  1994 /sbin/make
lrwxr-xr-x    1 root     sys           15 Apr 11  1994 /usr/bin/make -> ../../sbin/make
lrwxr-xr-x    1 root     sys           15 Apr 11  1994 /bin/make -> ../../sbin/make

So, you can see if your favorite third-party tool hides an equivalent
OS-supplied exceutable of the same name. 

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
#!/bin/sh
TEST2=`echo $PATH | sed 's/:/ /g'`
for file in  $TEST2 ; do ls -l $file/$1 2> /dev/null  ; done
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Private email Martin.Cracauer@wavehh.hanse.de Fax +4940 522 8536. No NeXTMail!
"As far as I'm concerned, if something is so complicated that you can't ex-
 plain it in 10 seconds, then it's probably not worth knowing anyway" - Calvin
Technical Details
Message-ID: <1995Mar15.154323.5082@wavehh.hanse.de>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!pipex!news.maz.net!news.ppp.de!news.Hanse.DE!wavehh.hanse.de!cracauer
References: <3jfnjp$3f4@qualcomm.com> <D5AuDt.4yH@dutiws.twi.tudelft.nl> <COLEMAN.95Mar12232748@redwood.skiles.gatech.edu> <1995Mar15.113157.7789@city.ac.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1025b4,68ac9cf3ff2e3960
X-Google-Attributes: gid1025b4,public
X-Google-ArrivalTime: 1995-03-15 11:00:44 PST
Newsgroups: gnu.misc.discuss
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!pipex!news.maz.net!news.ppp.de!news.Hanse.DE!wavehh.hanse.de!cracauer
From: cracauer@wavehh.hanse.de (Martin Cracauer)
Subject: Re: Where is "which"?
Message-ID: <1995Mar15.154323.5082@wavehh.hanse.de>
Organization: The Internet
References: <3jfnjp$3f4@qualcomm.com> <D5AuDt.4yH@dutiws.twi.tudelft.nl> <COLEMAN.95Mar12232748@redwood.skiles.gatech.edu> <1995Mar15.113157.7789@city.ac.uk>
Date: Wed, 15 Mar 95 15:43:23 GMT
Lines: 20