Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jun 2008 00:50:23 +0200
From:      Raphael Becker <rabe@uugrn.org>
To:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
Cc:        Jos Chrispijn <jos@webrz.net>, freebsd-questions@freebsd.org
Subject:   Re: Grep Guru
Message-ID:  <20080608225023.GD54922@ma.sigsys.de>
In-Reply-To: <20080608221328.U9955@wojtek.tensor.gdynia.pl>
References:  <484C3CC4.7050107@webrz.net> <20080608221328.U9955@wojtek.tensor.gdynia.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

--8nsIa27JVQLqB7/C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jun 08, 2008 at 10:15:50PM +0200, Wojciech Puchar wrote:
> find . -type f -print0|xargs -0 grep <grepoptions> <text to search>

There's no more need for find | xargs

Try:=20

find . -type -f -exec grep <grepoptions> <text to search> {} \+

-exec foo {} \+ behaves like xargs foo =20
-exec foo {} \; exec foo for every file

Regards
Raphael

--=20
Raphael Becker          <rabe@uugrn.org>          http://rabe.uugrn.org/
GnuPG:                E7B2 1D66 3AF2 EDC7 9828  6D7A 9CDA 3E7B 10CA 9F2D
=2E........|.........|.........|.........|.........|.........|.........|..

--8nsIa27JVQLqB7/C
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFITGIvnNo+exDKny0RAlyUAJ9QFGu+YDDMeSOzwulu2ny56EInbACgvFWF
YQjIJFILN3Raxpp57qf5YVM=
=15Pr
-----END PGP SIGNATURE-----

--8nsIa27JVQLqB7/C--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080608225023.GD54922>