Mail Archives: djgpp/1998/04/08/19:34:51
Could some kind person please provide me with a djgpp code example where the
names of multiple ("globbed") files are sequentially processed..... Or
could someone point me to a (simple!!!!) dos version of grep.
For example, the program I envision would enclude the following:
/***
* eat all files
*/
while(morefiles())
{
/***
* Get current filename into string fileS
*/
GetCurFile(fileS);
/***
* Open and do whatever
*/
fPF = fopen(fileS,"r");
/***
* do what ever
*/
......
/***
* close and report what ever
*/
fclose(fPF);
printf("File %s had ....\n",fileS);
}
I basicly want a dos grep.
If someone can make the above code work under djgpp, I'll use the example
and write it myself. I looked at the faq entry about name globbing, but
didn't see anything about how to actually deal with the resulting
multiple files; i.e. how to get the file names, opened files, etc..
Thanks in advance for any help
Ryan Koehler
p.s. please reply via email to koehler AT trpntech DOT com
- Raw text -