Date: Sun, 08 Jun 2008 21:26:30 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Simon Jolle sjolle <urandomdev@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Grep Guru Message-ID: <484C4076.3040804@infracaninophile.co.uk> In-Reply-To: <484C3FB7.4080208@gmail.com> References: <484C3CC4.7050107@webrz.net> <20080608201256.GA28987@ayn.mi.celestial.com> <484C3FB7.4080208@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2279F8F9ECFE6F32EB2E7DA1 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable 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 .= /=20 >>> and down. It does anything exept searching in files and reporting the= m. >>> 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 >=20 > Or install the GNU grep (from the man) >=20 > -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=20 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 PURPOS= E. grep -r works just fine. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig2279F8F9ECFE6F32EB2E7DA1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkhMQIUACgkQ8Mjk52CukIz8gwCfdKxOe8/kJ5Ou+krQ3fNQtN8P QIcAn2ySZKQl7yKbrkUOH24UPoM+BEdw =3sGY -----END PGP SIGNATURE----- --------------enig2279F8F9ECFE6F32EB2E7DA1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?484C4076.3040804>