On Wed, May 31, 2000 at 06:46:44AM -0700, Joe Sheble wrote:
-> Could grep be any more difficult to figure out? I'll admit I'm new to
-> Linux, but so far everything I've set out to do (set up a server, set up
-> sendmail, set up Apache, set up PHP, etc...) I have accomplished fairly
-> easy. Except for grep... All I want to do is search all the *.c file
-> recursively starting from a specific directory for a specific string...
->
-> grep -r -e "function something" -f *.c
I'd start with:
grep -i "function" *.c
-r gives you recursion, which you may or may not want.
-f says to grep, get your search pattern from this file, not from the
command line. Since it will eat the first expansion of *.c for the file
name, it will try to use that file as a repository of search patterns, and
most likely fail. So you will get no output.
Try
info grep
It doesn't have any examples, but it is a bit clearer than the man page.
->
-> Isn't that what this is supposed to do? Instead of getting a listing of
-> files containing the text I'm searching for and what line number it appears
-> on, I get pages after page after page of 'stuff', nothing of which has
-> anything to do with what I'm searching for.
->
-> Yeah, I know... RTFM... I've read, and re-read the man pages for grep over
-> and over and over, and so far it has remained gobblygook... The one thing
-> missing in all man pages thus far are some useful examples...
->
-> SO could somebody enlighten me about this mystery that is grep?
->
-> Joseph (Joe) Sheble
-> a.k.a. Wizaerd
-> ========================================
-> Wizaerd's Realm
-> http://www.wizaerd.com
-> 3D Art, ColdFusion, Illustration, Canvas
-> a little bit of everything...
-> ========================================
-> ColdFusion Developer
-> Zanova, Inc.
-> http://www.ZanovaInc.com
-> Moving your business forward...
-> ========================================
--
-- C^2
No windows were crashed in the making of this email.
Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley