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 Reply-To: From: "Ajith Kumar" To: "'Andy Rushton'" , Subject: RE: Wildcard problem with recursion Date: Sat, 25 Oct 2003 11:50:23 +0530 Message-ID: <000101c39ac0$136684f0$9c01a8c0@shakti.tallysolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal Importance: Normal In-Reply-To: <3F98EA87.3090109@ecs.soton.ac.uk> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 -----Original Message----- From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf Of Andy Rushton Sent: Friday, October 24, 2003 2:32 PM To: cygwin AT cygwin DOT com Subject: Re: Wildcard problem with recursion Corinna Vinschen wrote: >On Thu, Oct 23, 2003 at 03:05:53PM +0530, Ajith Kumar wrote: > > >>Cygwin utilities like grep or ls with -R options doesn't seem to be working. >>egs when I say >> >> >>>grep -r FLD_DCT_STRING *.h?? >>> >>> >>I get >>grep: *.hpp: No such file or directory >> >>However there are many .h, .hxx and .hpp files in the subdirectories >> >>ls also gives the same err. >> >>Any solutons? >> >> > >Yes, read the shell man pages to learn how file completion works. >What you want is a job for `find | xargs grep'. > > Thanks for the xargs tip Corinna - thats a new one on me. an alternative (talking to original poster here) is: grep FLD_DCT_STRING `find . -name '*.h??'` ------------------------------ 1 Or you can search *directories* recursively with grep, but this doesn't allow you to filter the file type. e.g.: grep -r FLD_DCT_STRING . ------------------------------- 2 where '.' is the current directory - this will search all files in subdirectories too. See 'info grep'. Andy -- Andy Rushton, Research Fellow, School of ECS, Southampton University address: rm 3053, Mountbatten Building (53) phone: 023 8059 6665 http://www.ecs.soton.ac.uk/~ajr1 **************************************************************************** ******** The command 2 works fine. However 1 fails revereting to my original problem. If I execute the find command alone I get D:\views\aj_pvt\Tally63>find . -name '*.h??' File not found - '*.h??' or D:\views\aj_pvt\Tally63>find . -name *.h?? File not found - *.h?? I did n't reply my previous cygwin installation. As u see I use the Win2k cmd prompt Regards, ajith -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/