Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.os.misc Subject: Re: Globbing Message-ID: <5H0ABE8@xds13.ferranti.com> Date: 15 Mar 91 20:05:22 GMT References: <17097@lanl.gov> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Distribution: na Organization: Xenix Support, FICC Lines: 40 In article mwm@pa.dec.com (Mike (My Watch Has Windows) Meyer) writes: > 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. It solves the 95% case, and doesn't make the 5% case much harder at all. > 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. Yes, you do that in tcl. "eval [concat ls [glob *.c]]". And, of course, since the shell is doing the globbing you *can* implement this in UNIX. You can't in AmigaOS, VMS, or other systems where the program does the globbing. Welcome to TclU 4.0 tcl> eval [concat ls [glob *.c]] bozo.c crashme.c deproto.c kill.c.l.c tcl> Hmmmm... > % diff foo.{new,old} But this *is* globbing. The implementation sucks, but it's similar to: 1> diff foo(new|old) -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"