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-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.buerger.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards Date: Fri, 23 Feb 2007 10:25:08 +0100 Organization: Jacob's private Usenet server Message-ID: References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> NNTP-Posting-Host: taasingegade.news.jacob-sparre.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: jacob-sparre.dk 1172222708 28552 85.82.239.166 (23 Feb 2007 09:25:08 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 23 Feb 2007 09:25:08 +0000 (UTC) User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:VHWgL0OOW2U7xaaE94hlMC5k0sE= Xref: g2news2.google.com comp.lang.ada:9449 Date: 2007-02-23T10:25:08+01:00 List-Id: Robert A Duff wrote: > And there's no wildcard that means "all subdirectories, recursively". Not in POSIX, but at least one of the newer shells (Zsh) has it: **/*.ad[sb] > So we're stuck with kludgery like "find" and "xargs". And the untyped-ness of pipes. > And I can't create a command that works like this: > > search *.ada "some string" Why not? > If I type: > > rm *.junk blah.* > > and there happens to be a file called blah.junk, I get an annoying > error message. Why? I asked to delete that file! I consider that a bug in "rm". But it would be slightly less efficient to make "rm" keep track of which files it already has unlinked. > The problem is not so much that the shell does the wildcard > expansions. The problem is that it's all based on textual > substition. Semantics based on textual substition is just plain > confusing. What looks like one argument (e.g. *.ada) ought to be in > fact one argument (albeit a list of many files). I think you may be right about this. But who feels like creating a better shell? Preferably also with typed pipes. Greetings, Jacob -- "I just might be wrong."