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!

grep & find

Status
Not open for further replies.

uguess

Technical User
Nov 5, 2004
40
CA
if i want to search multiple files for specific field and then return the matching filename + line number. how can i do that.

 
Have a look at the -n option in the grep's man page.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Also see the -r option, if you are using GNU grep. If it is available you will not need to use find at all.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top