All of lore.kernel.org
 help / color / mirror / Atom feed
* (unknown)
@ 2003-02-27 19:05 n  mishra
  2003-02-28  8:50 ` Search tool Robin Doer
  0 siblings, 1 reply; 2+ messages in thread
From: n  mishra @ 2003-02-27 19:05 UTC (permalink / raw)
  To: linux-gcc

Hi all,
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.
Or is there any way i can use something like grep through a 'c' 
program.
Thanks
mishra

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Search tool
  2003-02-27 19:05 (unknown) n  mishra
@ 2003-02-28  8:50 ` Robin Doer
  0 siblings, 0 replies; 2+ messages in thread
From: Robin Doer @ 2003-02-28  8:50 UTC (permalink / raw)
  To: n mishra; +Cc: linux-newbie

> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-28  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-27 19:05 (unknown) n  mishra
2003-02-28  8:50 ` Search tool Robin Doer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.