On Wed, 31 May 2000, 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

'-f' is your problem. This line should be:
  
  grep -r -e "function something" *.c
 
> Isn't that what this is supposed to do?

With -f grep takes file you specified ( in this case first file in
current directory with .c extension) as file containing patterns to
match and remaining files with .c extension as files to grep, so the
result must be pretty confusing.

Regards

-- 
Registered Linux user #166697
visit http://counter.li.org to register
Sign the petition at http://www.libranet.com/petition.html
Help bring us more Linux Drivers




Reply via email to