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 each word of a file

Status
Not open for further replies.

sumas

Programmer
Jul 9, 2006
9
US
Hello all,

I am trying to grep each word of a file.
I have a file with 1.txt,
rob
tom
john

I want to grep tom file.txt, grep rob file.txt,

I am struck at... I could do this awk '{print $1}' 1.txt | grep ??(not sure here)

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top