Grep Guru

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Jun 8 20:26:58 UTC 2008


Simon Jolle sjolle 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.

The system supplied grep(1) /is/ gnu grep:

happy-idiot-talk:~:% 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.

grep -r works just fine.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080608/bd3d490a/signature.pgp


More information about the freebsd-questions mailing list