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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find and grep

Status
Not open for further replies.

spookie

Programmer
May 30, 2001
655
IN
Hi,

I am issuing find command as
Code:
find  $path -type f -print
Now i want to filter out certain file names using some regex with the above command, but i am not getting exact syntax.
Code:
find  $path -type f -print | grep 'abc*xyz'
# not working..


--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
See grep -v perhaps?

All I ask of you
Is make my wildest dreams come true
 
How about:

find $path -type f -print -exec grep 'abc*xyz' {} \;

or

find $path -type f -print | xargs grep 'abc*xyz'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top