From owner-freebsd-questions@FreeBSD.ORG Sun Jun 8 20:38:58 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6110A106566C for ; Sun, 8 Jun 2008 20:38:58 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from mailout.zetnet.co.uk (mailout.zetnet.co.uk [194.247.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id 129BB8FC2C for ; Sun, 8 Jun 2008 20:38:57 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from irwell.zetnet.co.uk ([194.247.47.48] helo=zetnet.co.uk) by mailout.zetnet.co.uk with esmtp (Exim 4.63) (envelope-from ) id 1K5RfF-0000iy-BP; Sun, 08 Jun 2008 21:38:57 +0100 Received: from melon.esperance-linux.co.uk (54-144.adsl.zetnet.co.uk [194.247.54.144]) by zetnet.co.uk (8.14.1/8.14.1/Debian-9) with ESMTP id m58KcvHd007387; Sun, 8 Jun 2008 21:38:57 +0100 Received: by melon.esperance-linux.co.uk (Postfix, from userid 1001) id D6C43FCA4AF; Sun, 8 Jun 2008 21:38:51 +0100 (BST) Date: Sun, 8 Jun 2008 21:38:51 +0100 From: Frank Shute To: Simon Jolle sjolle , freebsd-questions@freebsd.org Message-ID: <20080608203851.GB92357@melon.esperance-linux.co.uk> Mail-Followup-To: Simon Jolle sjolle , freebsd-questions@freebsd.org References: <484C3CC4.7050107@webrz.net> <20080608201256.GA28987@ayn.mi.celestial.com> <484C3FB7.4080208@gmail.com> <20080608203420.GA92357@melon.esperance-linux.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080608203420.GA92357@melon.esperance-linux.co.uk> User-Agent: Mutt/1.4.2.3i X-Face: *}~{PHnDTzvXPe'wl_-f%!@+r5; VLhb':*DsX%wEOPg\fDrXWQJf|2\,92"DdS%63t*BHDyQ|OWo@Gfjcd72eaN!4%NE{0]p)ihQ1MyFNtWL X-Operating-System: FreeBSD 6.3-RELEASE-p2 i386 X-Organisation: 'Esperance Linux' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (zetnet.co.uk [194.247.46.1]); Sun, 08 Jun 2008 21:38:57 +0100 (BST) Cc: Subject: Re: Grep Guru X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Shute List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2008 20:38:58 -0000 On Sun, Jun 08, 2008 at 09:34:20PM +0100, Frank Shute wrote: > > On Sun, Jun 08, 2008 at 10:23:19PM +0200, 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. > > > > What's gained from GNU grep? FreeBSD grep, automatically recurses in > to each subdir unless given the -maxdepth option. > > Looks like FreeBSD grep wins (one less argument needed) ;) Sorry, got confused between grep and xargs! > > Regards, > > -- > > Frank > -- Frank Contact info: http://www.shute.org.uk/misc/contact.html