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,FREEMAIL_FROM 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!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!uucp.gnuu.de!newsfeed.arcor.de!newsspool3.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: <1172237312.430920.57840@z35g2000cwz.googlegroups.com> References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <1172164072.071896.197990@j27g2000cwj.googlegroups.com> <1172237312.430920.57840@z35g2000cwz.googlegroups.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1172238995.13543.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Date: Fri, 23 Feb 2007 14:56:36 +0100 NNTP-Posting-Date: 23 Feb 2007 14:54:27 CET NNTP-Posting-Host: cbc77600.newsspool2.arcor-online.net X-Trace: DXC=jHgnaLZBl:leoCI^f\Y]EaA9EHlD;3Ycb4Fo<]lROoRa8kF On Fri, 2007-02-23 at 05:28 -0800, brian.b.mcguinness@lmco.com wrote: > for FILE in *; do mv "$FILE" $(echo $FILE | sed 's/ /_/g'); done This fails in a case Bob has mentioned, viz. when the *-expanded list gets too long for the shell. A "simple" alternative without wildcards is, in this case, $ ls | while read FILE; do mv "$FILE" ... ; done