[comp.binaries.ibm.pc.d] Wildcard expansion for any command, w/DLC source

danno@microsoft.UUCP (Daniel A. Norton) (07/28/88)

Although this program makes it easier, it's not really necessary:

In article <3500@bsu-cs.UUCP>, bright@dataio.Data-IO.COM (Walter Bright) writes:
> 
> commands would be done as:
> 	WILDCARD FIND -"string" *.c
> and:
> 	WILDCARD FIND -"string" file1 file2 file3

You could write:

for %i in ( *.c ) do find "string" %i

or

for %i in ( file1 file2 file3 ) do find "string" %i

If it's in a batch file you'd need to change the "%i" to "%%i", like
this:

for %%i in (*.c) do find "string" %%i


-- 
Any opinions expressed are mine, not my employer's.
nortond@microsof.beaver.washington.EDU nortond%microsof@uw-beaver.ARPA
{decvax,decwrl,sco,sun,trsvax,uunet,uw-beaver}!microsof!nortond

toma@tekgvs.GVS.TEK.COM (Tom Almy) (07/29/88)

The functionality of this program is already available in the (MS/PC)-DOS
FOR command.  As an example:

FOR %i IN (*.TXT) DO FIND "string" %i

Admittedly, this syntax isn't as nice as the submitted program's, but at
least DOS will do what the author wanted.

Tom Almy
toma@tekgvs.TEK.COM