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!postnews.google.com!z35g2000cwz.googlegroups.com!not-for-mail From: brian.b.mcguinness@lmco.com Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards Date: 23 Feb 2007 05:28:32 -0800 Organization: http://groups.google.com Message-ID: <1172237312.430920.57840@z35g2000cwz.googlegroups.com> References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <1172164072.071896.197990@j27g2000cwj.googlegroups.com> NNTP-Posting-Host: 192.172.8.14 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1172237321 26622 127.0.0.1 (23 Feb 2007 13:28:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 23 Feb 2007 13:28:41 +0000 (UTC) In-Reply-To: <1172164072.071896.197990@j27g2000cwj.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: z35g2000cwz.googlegroups.com; posting-host=192.172.8.14; posting-account=R0BKUQwAAAAEH1zhMKQoEzkWfZJu3USj Xref: g2news2.google.com comp.lang.ada:9457 Date: 2007-02-23T05:28:32-08:00 List-Id: On Feb 22, 12:07 pm, "Adam Beneschan" wrote: > On Feb 22, 3:19 am, Jean-Pierre Rosen wrote: > > Sigh... this has been one of my pet peeves with Unix for a long time. > With other operating systems I've worked with, you can enter a command > like > > rename *.ads *.ada > > for instance, to rename a bunch of files. Unix makes this difficult. > (Yes, I know how to use "foreach" in csh... but still...) > > -- Adam The Unix solution is more compliocated, but also more flexible. For example, I often do something like this: for FILE in *; do mv "$FILE" $(echo $FILE | sed 's/ /_/g'); done to replace blanks in file names with underscores. I suppose that one could get the advantages of both the Unix and Windows approaches by reversing the usual Unix approach and having the user explicitly request expansions where desired, e.g. mv @(*.txt) dest to move all *.txt files to dest. --- Brian