The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-12-2009
Rally_Point Rally_Point is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 11
Finding names in multiple files - second attempt

I couldn't find the original thread that I created and since I didn't get a definitive answer, I figured I'd try again. Maybe this time I can describe what I want a little better.


I've got two files, each with thousands of names all separated by new line. I want to know if 'name in file1' also appears anywhere in file 2 then print it out for me (though output isn't the problem).

I've thought that maybe there's a way to walk through the first file and with each line then walk through each line in the second file (something like a nested loop statement) and then go from there. I'm just wondering if that will work of if there is a better and EASIER way.

Thanks