Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!ucbvax!van-bc!rsoft!mindlink!a563 From: a563@mindlink.UUCP (Dave Kirsch) Newsgroups: comp.os.msdos.apps Subject: Re: Filename expansion missing from MSDOS gawk, version 2.11 Message-ID: <2289@mindlink.UUCP> Date: 29 Jun 90 02:46:54 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 41 > steve@cs.su.oz writes: > > Msg-ID: <1074@cluster.cs.su.oz> > Posted: 29 Jun 90 15:24:59 GMT > > Org. : Basser Dept of Computer Science, University of Sydney, Australia > Person: Stephen Russell > > In article <321@happym.wa.com> irv@happym.wa.com (Irving Wolfe) writes: > > [ lack of globbing in gawk under MSDOS ... ] > >A better solution than a mere upgrade to handle stars might be getting a > >reasonable shell that will run under MSDOS. They exist; MKS has made a fine > >one and I'm sure there are others. > > While the MKS shell is very neat, and I'm sure the others are too, they > won't solve the problem completely. The 128 byte MSDOS command line > puts a nasty limit on the length of the expanded line. The MKS utilities > use a non-standard mechanism to get at the shell's expanded command > line, but this is inherently nonportable. > > Nope, under MSDOS you have to do the work yourself. Anyway feel like > donating a glob() function to the public domain? Sure, here's one that will do all the files ending in the extension .C: for %f in (*.c) do gawk %f There, simple wild card expansion. If you want, you can stick in in a batch file, like this: --- CUT HERE -- FILE GLOB.BAT -- for %%f in (%2 %3 %4 %5 %6 %7 %8 %9) do %1 %%f --- CUT HERE -- FILE GLOB.BAT -- And you can just go: GLOB gawk *.c *.h *.cpp -- -- David Kirsch UUCP: {uunet,ubc-cs}!van-bc!rsoft!mindlink!a563 Voice: (604) 327-4404 a563@mindlink.UUCP Vancouver, British Columbia 'In-no-sense? Nonsense!' - The Art Of Noise