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,UTF8 Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Thu, 22 Feb 2007 09:15:40 -0600 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> Date: Thu, 22 Feb 2007 16:15:40 +0100 Message-ID: <87hctei5pf.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:alNZH/ofBQgGDvYJE7ax110joS4= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 62.235.206.179 X-Trace: sv3-aVKFJmUKAK4J+ZS7q73IAII4GUvWbwOeS+xXuRutVBoVJEYPr9hU6DzH6wVTtLYtd3lvcvqor98SEvY!nAk8Jl0A71wThu1+vhsKXVuFoAg7Lx0DK4kn/AxNTcsHaQP9OOXg4TmAxsBOMbq9wjGHaGKUc5A= X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:9414 Date: 2007-02-22T16:15:40+01:00 List-Id: Jean-Pierre Rosen writes: > Maciej Sobczak a écrit : >> Jean-Pierre Rosen wrote: >> >>> Too bad that Unix behaviour was wrong in the first place... >> >> I don't understand. Shell uses some special characters to make it >> easier for the user to type commands [1]. Wildcards are just an >> example. Consider this: >> >> $ cat *.ads *.adb | wc -l > loc.txt >> >> If you claim that * above should be passed "as is" to the program >> (cat), so that the program can figure out on itself what to do with >> it, then you might as well argue that the program should figure out >> *everything* above. Obviously, that wouldn't be funny. >> > I claim it would be easier to provide a function that expands > parameters, than to force expansion. Or maybe just provide another > function that provides the raw parameters. There are three such "other functions": $ cat '*.ads *.adb' | wc -l > loc.txt $ cat "*.ads *.adb" | wc -l > loc.txt $ cat \*.ads \*.adb | wc -l > loc.txt So could you please explain why you think the Unix behaviour is "wrong"? -- Ludovic Brenta.