On Sun, 08 Jun 2008 22:23:19 +0200, Simon Jolle sjolle <[EMAIL PROTECTED]> wrote: > On 06/08/2008 10:12 PM, Bill Campbell wrote: >> On Sun, Jun 08, 2008, Jos Chrispijn wrote: >>> I tried to make a grep script on find a string in all files on path >>> ./ and down. It does anything exept searching in files and reporting >>> them. Is there a Grep Guru who can hint me out? Thanks, >> >> I expect you need something like: >> >> find . -type f -print0 | xargs -0 grep pattern > > Or install the GNU grep (from the man) > > -R, -r, --recursive > Read all files under each directory, recursively; this is > equivalent to the -d recurse option.
/usr/bin/grep *is* GNU grep in FreeBSD: % [EMAIL PROTECTED]:/home/keramida$ grep --version % grep (GNU grep) 2.5.1-FreeBSD % % Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc. % This is free software; see the source for copying conditions. There is NO % warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. % % [EMAIL PROTECTED]:/home/keramida$ AFAIK, Gabor Kovesdan is working on replacing grep(1) with a BSD-licensed implementation, but he also tries to keep UI compatibility as much as possible. So I guess the -r/-R option should work in that version too once it hits the tree. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"