Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <016201c2bfd7$85d50800$78d96f83@pomello> From: "Max Bowsher" To: , References: <005201c2bfcc$17dd7c20$6502a8c0 AT amer DOT cisco DOT com> Subject: Re: grep -r *.java doesn't work as expected Date: Sun, 19 Jan 2003 16:26:30 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Wai-Yip Tung (wtung) wrote: > I try to grep all .java file recursively > > [/q/Workflow/AppAdmin/src/com/cisco/wf/admin] $ grep -rn systemRsrc > *.java > > Only files in the current directory is searched. > What's wrong? Nothing. This is the expected behaviour. The shell expands *.java, and then runs grep -rn file1.java file2.java file3.java - none of which are directories, so grep can't recurse into them. Try: find -name '*.java' | xargs grep -n systemRsrc Max. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/