> I am trying to write a program in c to be able to search a file
> for any pattern which will be given by the user at
> runtime.Basically a search tool.
> Could someone suggest a good way of doing this.I've heard of lex
> and yacc and also awk.Which one is better or is there any other
> option.

Indeed. 
Some days ago there was a discussion in the ML "File name with spaces" - go 
through a filesystem and make something. You can use use this as input.

> Or is there any way i can use something like grep through a 'c'
> program.

Check the manpages of opendir, readdir... and regex

Good look,
Robin
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to