Xref: utzoo comp.std.c:4364 comp.lang.c:36378 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!gatech!utkcs2!hydra2b.cs.utk.edu!lape From: lape@hydra2b.cs.utk.edu (Bryon S. Lape) Newsgroups: comp.std.c,comp.lang.c Subject: Re: HELP: ===> wildcard ===> filename listing Message-ID: <1991Feb21.210305.7444@cs.utk.edu> Date: 21 Feb 91 21:03:05 GMT References: <1991Feb21.140918.1650@cs.utk.edu> <1991Feb21.172953.7488@cs.utk.edu> Sender: usenet@cs.utk.edu (USENET News Poster) Reply-To: lape@hydra2b.cs.utk.edu (Bryon S. Lape) Organization: Univ of TN, Knoxville - CS Department Lines: 27 In article <1991Feb21.172953.7488@cs.utk.edu>, lape@cs.utk.edu (Bryon S. Lape) writes: |> In article <1991Feb21.140918.1650@cs.utk.edu> lape@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