X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_05,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Date: Wed, 8 Aug 2012 09:48:27 -0700 From: Gary Johnson To: cygwin AT cygwin DOT com Subject: Re: problem using recursive grep (-r option) Message-ID: <20120808164827.GA4000@phoenix> Mail-Followup-To: cygwin AT cygwin DOT com References: <34266659 DOT post AT talk DOT nabble DOT com> <34270643 DOT post AT talk DOT nabble DOT com> <50223025 DOT 90003 AT gmail DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50223025.90003@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 2012-08-08, marco atzeri wrote: > On 8/8/2012 11:11 AM, AngusC wrote: > > > DO NOT TOP POST ! > > >I did try the --include way but in Cygwin it didn't work for some reason. Both of these work fine for me in Cygwin (on Windows XP): grep -nH -r "my pattern" --include "*.log" . grep -nH -r "my pattern" --include=*.log . > >Neither does > > > >find "." -name "*.log" -exec grep -nH "my pattern" {} \; as does that > > find "." -name "*.log" -exec grep -nH "my pattern" \{\} \; and that. The quoting of . and {} is not needed. Perhaps the real problem is with "my pattern". Regards, Gary -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple