Date: Sat, 13 Jul 1996 22:30:22 -0700 From: bmah@cs.berkeley.edu (Bruce A. Mah) To: tcg@ime.net Cc: bmah@cs.berkeley.edu, FreeBSD-Questions <questions@freebsd.org> Subject: Re: Recursive grep. Message-ID: <199607140530.WAA16832@conviction.CS.Berkeley.EDU> In-Reply-To: Your message of "Sat, 13 Jul 1996 18:12:25 EDT." <31E81F49.6B08@ime.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Gary Chrysler writes:
> Thanks Bruce, But I can't extract the attachment. Netscape blows up!
OK, we'll do it the old-fashioned way. :-)
(Kind of a moot point now, since this solution isn't significantly
different than another one posted, but just for follow-through...)
Bruce.
-----
#!/bin/csh -f
# $Id: rgrep,v 1.1 1992/07/04 18:34:15 bmah Exp bmah $
#
# $Header: /db/users/bmah/bin/RCS/rgrep,v 1.1 1992/07/04 18:34:15 bmah
Exp bmah $
#
# rgrep
# Bruce A. Mah (bmah@tenet.berkeley.edu)
#
# Recursive grep.
#
# $Log: rgrep,v $
# Revision 1.1 1992/07/04 18:34:15 bmah
# rgrep won't try to grep directories now.
#
# Revision 1.0 1992/07/02 19:10:04 bmah
# Initial revision
#
#
if ($#argv == 2) then
set noglob
find . \! -type d -name $2 -exec grep $1 {} /dev/null ";"
unset noglob
else if ($#argv == 1) then
set noglob
find . \! -type d -exec grep $1 {} /dev/null ";"
unset noglob
else
echo "usage: rgrep {target}"
echo " rgrep {target} {filespec}"
endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607140530.WAA16832>
