From owner-freebsd-questions@FreeBSD.ORG Thu Nov 13 15:18:16 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 016DF16A4CE for ; Thu, 13 Nov 2003 15:18:16 -0800 (PST) Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.103.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E424143FDF for ; Thu, 13 Nov 2003 15:18:14 -0800 (PST) (envelope-from mph@wopr.caltech.edu) Received: from wopr.caltech.edu (localhost.caltech.edu [127.0.0.1]) by wopr.caltech.edu (8.12.9/8.12.9) with ESMTP id hADNIEpZ067052; Thu, 13 Nov 2003 15:18:14 -0800 (PST) (envelope-from mph@wopr.caltech.edu) Received: (from mph@localhost) by wopr.caltech.edu (8.12.9/8.12.9/Submit) id hADNIERD067051; Thu, 13 Nov 2003 15:18:14 -0800 (PST) Date: Thu, 13 Nov 2003 15:18:14 -0800 From: Matthew Hunt To: Chris Readle Message-ID: <20031113231813.GA66928@wopr.caltech.edu> References: <20031113224657.GA66502@wopr.caltech.edu> <20031113225534.69670.qmail@web40611.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031113225534.69670.qmail@web40611.mail.yahoo.com> User-Agent: Mutt/1.5.1i cc: FreeBSD Questions List Subject: Re: Recursion with grep? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2003 23:18:16 -0000 On Thu, Nov 13, 2003 at 02:55:34PM -0800, Chris Readle wrote: > You can also do this with something like: > > ls -laR | egrep *.c He's trying to search the contents of files for a string. Your suggestion searches the directory listing (and not in a very useful way, since *.c does not mean the same thing as a regular expression as it does as a wildcard, and it could also match parts of the "ls -l" output besides the filename). -- Matthew Hunt * Stay close to the Vorlon. http://www.pobox.com/~mph/ *