delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Reply-To: | <wtung AT cisco DOT com> |
From: | "Wai-Yip Tung \(wtung\)" <wtung AT cisco DOT com> |
To: | "'Max Bowsher'" <maxb AT ukf DOT net>, <cygwin AT cygwin DOT com> |
Subject: | RE: grep -r *.java doesn't work as expected |
Date: | Tue, 21 Jan 2003 10:39:48 -0800 |
Message-ID: | <000101c2c17c$7a021ee0$88d16b80@amer.cisco.com> |
MIME-Version: | 1.0 |
X-Priority: | 3 (Normal) |
X-MSMail-Priority: | Normal |
Importance: | Normal |
In-Reply-To: | <016201c2bfd7$85d50800$78d96f83@pomello> |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
Thank you for all suggestions. I got it works now. I'm new to bash and the * expansoin by bash kind of surprise me. Wai-yip -----Original Message----- From: Max Bowsher [mailto:maxb AT ukf DOT net] Sent: Sunday, January 19, 2003 8:27 AM To: wtung AT cisco DOT com; cygwin AT cygwin DOT com Subject: Re: grep -r *.java doesn't work as expected 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |