Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding files containing text

Status
Not open for further replies.

darfader

Programmer
Aug 6, 2003
38
GB
Hi,

hopefully, I can phrase this one better,

I'm trying to find the occurence of a string in some header files in various directories below the one I am starting from, but this isn't working

find . -name '*.h' -print 2>/dev/null | grep -i seq_no

the reason for the ignore case flag is, I want to find which files have which case in them, but this won't select any of them !


tia,
 
find . -name '*.h' -exec grep -i seq_no {} \; -print
 
Try something like this:
Code:
find . -name '*.h' -print | xargs grep -i seq_no

Hope This Help
PH.
 
thank you both


for supplying a different way to achieve the same thing :D


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top