From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30709 invoked by alias); 24 Oct 2003 09:02:06 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 30702 invoked from network); 24 Oct 2003 09:02:02 -0000 Received: from unknown (HELO raven.ecs.soton.ac.uk) (152.78.70.1) by sources.redhat.com with SMTP; 24 Oct 2003 09:02:02 -0000 Received: from pigeon.ecs.soton.ac.uk (ns1 [152.78.68.1]) by raven.ecs.soton.ac.uk (8.9.3/8.9.3) with ESMTP id KAA26848 for ; Fri, 24 Oct 2003 10:02:01 +0100 (BST) Received: from ecs.soton.ac.uk (vogue [152.78.66.19]) by pigeon.ecs.soton.ac.uk (8.9.3/8.9.3) with ESMTP id KAA29663 for ; Fri, 24 Oct 2003 10:02:01 +0100 (BST) Message-ID: <3F98EA87.3090109@ecs.soton.ac.uk> Date: Fri, 24 Oct 2003 10:47:00 -0000 From: Andy Rushton User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en, en-us MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Wildcard problem with recursion References: <000301c39949$0dc87850$9c01a8c0@shakti.tallysolutions.com> <20031023101419.GA1653@cygbert.vinschen.de> In-Reply-To: <20031023101419.GA1653@cygbert.vinschen.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg01568.txt.bz2 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??'` 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 . 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 -- 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/