From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e219d94b946dfc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!news.germany.com!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Message-Id: <2356440.4AccBihAbC@linux1.krischik.com> From: Martin Krischik Subject: Re: Ada.Command_Line and wildcards Newsgroups: comp.lang.ada Date: Sun, 25 Feb 2007 18:02:58 +0100 References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <1172249891.912137.64150@k78g2000cwa.googlegroups.com> <9oMDh.34649$E02.13482@newsb.telia.net> User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8Bit Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 84.73.230.248 X-Trace: news.sunsite.dk DXC=ZR?mcWc3=104KInH^?UCA:S5daR30PdP5V:_8RJBabH=g9KO4?]BWO;>89A_J0@WO Bj�rn Persson wrote: > Adam Beneschan wrote: > >> It would have made so much sense to have grep call an OS function to >> retrieve the file names one at a time and search them all, and then no >> huge buffer would be needed to hold all the filenames. > > grep --recursive 'some string' . But that will search all files including meta files like .directory, CVS, .svn and what else there might be. May I suggest: ffind is a function ffind () { find . -iname "${2}" | xargs grep -l "${1}" 2>/dev/null } and having learned about basename and dirname I will soon improve that function. Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com