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

Linux - Pattern Search

Status
Not open for further replies.

Cap2010

Programmer
Mar 29, 2000
196
CA
HI,<br>1)Wanted to search a name e.g.&nbsp;&nbsp;Tom in number of files<br>of my current directory and to redirect the output <br>to a file, so that I can see which all the<br>letters that has been written to Tom.<br><br>How to do it?<br><br><br>
 
If you want to make it case insensitive, try:<br><FONT FACE=monospace><br>grep -li Tom * &gt;&gt; file<br></font><br><br>If you wanted to search for Tom or Thomas:<br><FONT FACE=monospace><br>egrep -li &quot;Tom¦Thomas&quot; * &gt;&gt;file<br><br>HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top