delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/11/16:53:07

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: "Andre Oliveira da Costa" <costa AT cade DOT com DOT br>
To: <cygwin AT cygwin DOT com>, <gerrit DOT haase AT t-online DOT de>
Subject: RE: Recursive grep [WAS: Re: date]
Date: Thu, 11 Jan 2001 19:51:49 -0200
Message-ID: <000e01c07c18$b31a79d0$ab00000a@costa>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <3A5E274E.C57D2FD2@yahoo.com>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

> find . -name \*.cc -exec echo '{}' ';' -exec grep getenv '{}' ';'

Or...

find . -name \*.cc -print | xargs grep getenv

this way you wouldn't execute echo + grep for each file; instead you'd
execute grep over a bunch of files.

Just my $ 0.02 ;)

Best,

Andre


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019