The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-12-2008
frozentin frozentin is offline
Registered User
 

Join Date: May 2008
Posts: 29
By looking at your 2 examples, why don't you;
[1] loop thru the contents of the 2nd file
[2] compare every individual line of the 2nd file with all the lines in the first
[3] print matched lines to file3
[4] After looping thru all the entries in file2, do a diff between file1 and file_matched
[5] parse the o/p of [4] to file4

Disclaimer: I couldn't script if my life depended on it, so can't really help you with that.

Last edited by frozentin; 05-12-2008 at 09:18 PM. Reason: changed name of sample files
Reply With Quote