HELP: ===> wildcard ===> filename listing

Bryon S. Lape lape at hydra2b.cs.utk.edu
Fri Feb 22 08:03:05 AEST 1991


In article <1991Feb21.172953.7488 at cs.utk.edu>, lape at cs.utk.edu (Bryon S. Lape) writes:
|> In article <1991Feb21.140918.1650 at cs.utk.edu> lape at cs.utk.edu (Bryon S. Lape) writes:
|> >
|> >	I need to know who to get all the filenames that meet a given
|> >wildcard in Unix from c.  For instance, say my programme my_foo will print
|> >the contents of any file given and I type:
|> >
|> >		my_foo *a*.c
|> >
|> >	What I would like to get is all files with an a in them and an
|> >extension of .c, and print them to stdout (not the same way pg or more
|> >does, by the way).  How do I get a list of files meeting the passed
|> >wildcard?  I have done this in Quick C but that was using none standard
|> >funcs.
|> >
|> >
|> >	Please e-mail responses.
|> >
|> >
|> >Bryon|> 

	Now having said Unix, I wish to make it more general, so here goes....

	Is there a generic c solution to the above problem??  For all you flamers out there, please note that this IS a C question and has nothing to do with shells, or os, or etc....


Bryon



More information about the Comp.lang.c mailing list