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 Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <545bgvF1ttrphU1@mid.individual.net> <1495406.QZvfpqijrQ@linux1.krischik.com> <6dy7mn3hhu.fsf@hod.lan.m-e-leypold.de> <1172328891.5496.62.camel@localhost.localdomain> <1173096982.3712.37.camel@localhost> <8utzwzzv0v.fsf@hod.lan.m-e-leypold.de> <1173185771.11841.69.camel@localhost> <1173295307.860021.90570@p10g2000cwp.googlegroups.com> From: Markus E Leypold Organization: N/A Date: Wed, 07 Mar 2007 21:27:32 +0100 Message-ID: <4tmz2ox0i3.fsf@hod.lan.m-e-leypold.de> User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:rMt0tb4YfBhxQUytyAujp9u+EUc= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.72.248.154 X-Trace: news.arcor-ip.de 1173298881 88.72.248.154 (7 Mar 2007 21:21:21 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.hanau.net!news-fra1.dfn.de!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news2.google.com comp.lang.ada:9762 Date: 2007-03-07T21:27:32+01:00 List-Id: "Hyman Rosen" writes: > On Mar 6, 7:56 am, Georg Bauhaus wrote: >> When it comes to echo *.ads, a decision was necessary as to what >> should happen when there is no matching file name. The choice was >> not: reflect this fact and produce the empty result. This might >> have had other consequences somewhere else. Instead, it >> was to produce the pattern itself--which is very different from >> a file name. > > One of those other consequences is that many, if not most, UNIX > programs treat a no-argument command as meaning "do your default > action". So 'ls' with no directory arguments lists the current > directory and 'cat' with no file arguments reads standard input, and > so forth. If I wrote 'cat *.ads' and there were no such files and the > shell expanded that to nothing, 'cat' would sit endlessly awaiting > input from the terminal. As it stands, I get 'cat: cannot open *.ads' > and I see the problem. What we have is a design that works pretty well > interactively and pretty well in scripts, failing only on a few weird > cases. That's good enough, because it gets you to 90% of what you > need, and Worse is Better. No, worse is not better, but shell script is, strictly spoken, not a programming language but a interactive command language. Regards -- Markus