Subject: Re: grep -R
To: None <reinoud@ibbnet.org, netbsd-help@netbsd.org>
From: Paul Sander <paul@wakawaka.com>
List: netbsd-help
Date: 03/09/2000 19:08:41
I assume the -R option performs some kind of a recursive descent through
a source tree? What can it do that the following does not?
#! /bin/sh
pattern="$1"
shift
if [ $# = 0 ]
then
dirs="."
else
dirs="$@"
fi
for d in "$dirs"
do
find "$d" -type f -print | xargs grep "$pattern" /dev/null
done
If you're doing this kind of thing often, then you might also look into
the Glimpse indexing and search tools.
--- Forwarded mail from reinoud@ibbnet.org
Anyone knows where i can find source of grep -R to compile?
I really need it now here on my system to find stuff in source.
Any of you uses it?
Bye,
--- End of forwarded message from reinoud@ibbnet.org