home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso
/
altsrc
/
articles
/
10833
< prev
next >
Wrap
Text File
|
1994-07-11
|
824b
|
24 lines
Newsgroups: alt.sources
Path: wupost!math.ohio-state.edu!cs.utexas.edu!utnut!utzoo!telly!problem!vigard!mdf
From: mdf@vigard.mef.org (Matthew Francey)
Subject: Re: Source to a simple which command (C program source)
References: <1994Jul8.104300.16682@walter.cray.com>
Organization: The International Bank of Intermod
Date: Sun, 10 Jul 1994 00:41:28 GMT
Message-ID: <1994Jul10.004128.25426@vigard.mef.org>
Lines: 13
jwl@dogwood.cray.com (James W. Lynch) writes:
>I noticed a discussion recently that suggested that everyone didn't
>have a which command.
IFS=" \011\012:"
for i in $*; do
for j in $PATH; do
[ -x $j/$i ] && { echo $j/$i; break; }
done
done
--
Matthew Francey mdf@vigard.mef.org ve3rqx@io.org
"live before you die" GPS(NAD27): N43o34.210' W079o34.563' +0093m