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!postnews.google.com!p10g2000cwp.googlegroups.com!not-for-mail From: "Adam Beneschan" Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards Date: 23 Feb 2007 19:46:21 -0800 Organization: http://groups.google.com Message-ID: <1172288781.256307.12710@p10g2000cwp.googlegroups.com> 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> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1172288793 26577 127.0.0.1 (24 Feb 2007 03:46:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 24 Feb 2007 03:46:33 +0000 (UTC) In-Reply-To: <9oMDh.34649$E02.13482@newsb.telia.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: p10g2000cwp.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news2.google.com comp.lang.ada:9476 Date: 2007-02-23T19:46:21-08:00 List-Id: On Feb 23, 5:19 pm, Bj=F6rn 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' . Well, that's intuitive. To do a grep on a large number of files, use --recursive. I suppose that to solve Bob's problem where he would like to go recursively into directories, he should try --lots-of- files. Of course there are solutions. As it is, since all my mail message file names are six-digit numbers, it's really easy to solve the problem with "foreach". The point isn't that we don't know how to do it; the point is that some of us think that the fact that we have to resort to kludges like "foreach" or "xargs" or "grep --recursive" indicates that the design was inadequate in the first place. -- Adam