Path: utzoo!attcan!uunet!samsung!munnari.oz.au!metro!cluster!steve From: steve@cs.su.oz (Stephen Russell) Newsgroups: comp.os.msdos.apps Subject: Re: Filename expansion missing from MSDOS gawk, version 2.11 Message-ID: <1083@cluster.cs.su.oz> Date: 4 Jul 90 14:43:17 GMT References: <2289@mindlink.UUCP> Sender: news@cluster.cs.su.oz Reply-To: steve@cluster.cs.su.oz (Stephen Russell) Organization: Basser Dept of Computer Science, University of Sydney, Australia Lines: 22 In article <2289@mindlink.UUCP> a563@mindlink.UUCP (Dave Kirsch) writes: >> 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. This will often be enough, but not always, depending on what the awk script does in its END action, for example. Some awk scripts may also need all of the input file names (using ARGV[]) to perform their function. Unfortunately, you're also still stuck with MSDOS's simple wildcard expansion. No character classes, no embedded literals ("*[a-c]x???"), etc. A full-blown UNIX style glob() would allow provide facilities. Cheers, Steve.