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!news1.google.com!news.germany.com!news.belwue.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards From: Georg Bauhaus In-Reply-To: <6dy7mn3hhu.fsf@hod.lan.m-e-leypold.de> 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> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1172328891.5496.62.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Date: Sat, 24 Feb 2007 15:54:51 +0100 NNTP-Posting-Date: 24 Feb 2007 15:54:03 CET NNTP-Posting-Host: a44c9950.newsspool1.arcor-online.net X-Trace: DXC=iNd?h3cT33gPKPPVf;4hUjic==]BZ:afn4Fo<]lROoRaFl8W>\BH3YbZ7ndf4S17[eA:ho7QcPOVcWVW2lFAMVKl6[dRkb1]0hl X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:9490 Date: 2007-02-24T15:54:03+01:00 List-Id: On Sat, 2007-02-24 at 12:46 +0100, Markus E Leypold wrote: > Martin Krischik writes: > > > here. And they got it wrong. Bot Dos and VMS will warn you on: > ^^^^^^^^^^^^^^^^^^^ > > [...] On which criteria did > "they get it wrong"? Where are the specs against which the predicate > "right" can be tested? One criterion is the number of wildcard expansion surprises. Not having to mark patterns as patterns (untyped, no syntax) creates an immensely flexible and powerful ... mess. $ echo *.ads # argument text is a pattern *.ads # output text is a pattern $ echo *.adb # argument text is a pattern main.adb # output text is a file name $ ls *.ads ls: *.ads: No such file or directory $ ls *.adb main.adb (On the surface, ls(1) and echo(1) aren't consistently interpreting *.ads, one is reporting an error, the other is reproducing input. "But that's as defined, you ... If you can't be bothered to RTFM!") Since Unix shells use mostly text to represent almost all information, the user is advised to remember text substitution pitfalls like the one above. Shell programming, for all its power, is like using Unchecked_Conversion by default, so to speak. In case of errors then, keeping track can be quite tricky, even more so when there is indirection, for example through popular backtick evaluation, as in $ foo=`echo .[a-z]*` ; some_cmd $foo ... (run in a directory where there aren't any hidden files.) Caveat scriptor, the computer isn't programmed to help us here with type checking, OOD, etc.. That said, I'm looking forward to running Plan 9 again, on a virtual machine :)