Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 ARLENE 1/1/85; site dalcs.UUCP Path: utzoo!utcsri!utai!garfield!dalcs!silvert From: silvert@dalcs.UUCP (Bill Silvert) Newsgroups: net.sources.d Subject: which.c in mod.sources Message-ID: Date: Fri, 15-Aug-86 07:17:21 EDT Article-I.D.: dalcs.2007 Posted: Fri Aug 15 07:17:21 1986 Date-Received: Sat, 16-Aug-86 02:46:48 EDT Distribution: net Organization: Marine Ecology Lab. Lines: 21 This short program is highly recommended. I almost skipped it, since I already have which, but it turns out that mine is a shell script and the C program is incredibly fast compared to it. I also made a couple of trivial mods -- pick the ones you want: distributed version skips current directory -- add code if(path[0] == ':')... check cwd By the way, I also set mine so that it keeps running if it finds the file in the cwd, useful if you want to find the old version. -a option -- do not exit when file is found on path, list all occurences in order. One minor bug -- it exits if it doesn't find a file and will not look for subsequent arguments -- easily fixed. I haven't posted the patches, since (a) I hacked it on another system, (b) I used local functions which I am too lazy to distribute, (c) I hacked it to suit my own taste, and it is easy to make other changes. In any case, it is so much faster than the shell that I really wanted to steer people to it.