Hello Doru

> how can I use grep to find: myFunction(any_string_or_char) in a
> file?
> 
grep "myFunction *([^)]*)" *.c

finds any occurrence of

myFunction(any_string_or_char)
myFunction (any_string_or_char)
myFunction  (any_string_or_char)

etc. To find a declaration, use

grep "^ *[[:alpha:]]\+ *myFunction *([^)]*) *;" *.c *.h

To find a definition (without a remark on the same line)

grep "^ *[[:alpha:]]\+ *myFunction *([^)]*) *{\? *$" *.c *.h

But anyway, I recommend to use http://ctags.sourceforge.net for such
things.

Have fun!
Mathias


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to