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

new to linux, need grep help

Status
Not open for further replies.

786snow

Programmer
Nov 12, 2006
75
Hi,

I have directory, with folders and then those folders have further subfolders. I have a file that have a text

Exchange - changes to NASDAQ

I need to find the file that has that?


How can use grep to do that. I don't know how grep works I tried but it did not work

Thanks
 
thanks a lot, it possible to put that output to a new file?
because screen scroll a lot when the results come and I miss the top part of it,
 
Hi

Yes. Redirect it :
Code:
grep -r 'Exchange - changes to NASDAQ' . [red]> /output/file[/red]
Or just view it with a pager :
Code:
grep -r 'Exchange - changes to NASDAQ' . [red]| less[/red]

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top