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 cmd 2

Status
Not open for further replies.

Scunningham99

Programmer
Sep 20, 2001
815
GB
Hi All

I am executing the following cmd to grep all files in dir, but i would like it to return the file names instead it just does the following!!!

find . -name '*.pls' -exec grep ICX_CALL {} \;

the above cmd returns the following, but i need the file names which contain ICX_CALL

8 ICX_CALL:

Thanks in advance!!!
 
Try including an explicit print with the command:

find . -name '*.pls' -print -exec grep ICX_CALL {} \;

Hope this helps.
 
What about ..

find . -name '*.pls' -print -exec grep -l ICX_CALL {} \;

Greg.
 
Okey-dokey, take out the -print again and use the grep -l as suggested by Greg. HTH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top