Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!pa.dec.com!bacchus!mwm From: mwm@pa.dec.com (Mike (My Watch Has Windows) Meyer) Newsgroups: comp.os.misc Subject: Re: Globbing Message-ID: Date: 14 Mar 91 19:48:45 GMT References: <17097@lanl.gov> Sender: news@pa.dec.com (News) Distribution: na Organization: Missionaria Phonibalonica Lines: 45 In-Reply-To: peter@ficc.ferranti.com's message of 13 Mar 91 15:55:27 GMT I agree, that's a good idea. How do you get the programmers to glob in the places you want in the first place? You don't. Then again, shell globbing only solves one such case, and makes dealing with the rest that much harder. Even on systems that support globbing libraries, you run into this... and unlike shell globbing you don't get the option of quoting them to make them do what you want. Not true. A shell metacharacter that says "Please glob this argument for me" is possible. In fact, it can be kludged into most modern unix by tweaking ls to glob, and doing something like $(ls arg). In a non-globbing shell, I'd suggest *(arg) as the "quote" to indicate that this should be globbed. Better yet, *(arg,dir) to indicate globbing against dir instead of the current directory. Also: % ls foo* foo.new foo.old % diff foo* Don't forget: % diff foo* diff: two filename arguments required % ls foo* foo.new foo.old foo.saved This is a case where you want a different mechanism than globbing. To wit: % diff foo.{new,old} This also means you don't depend on the files names to get the arguments in the right order.