The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
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 07-25-2006
jerome Sukumar jerome Sukumar is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 22
Post Comparison of two files in awk

Hi,
I have two files file1 and file2 delimited by semicolon,
And I want to compare column 2 and column3 of file1 to column3 and column 4 in file2.

file1
--------
abc;cef;155.67;143_34;
def;fgh;146.55;123.3;
frg;hff;134.67;;
yyy;fgh;134.78;35_45;

file 2
---------
abc;cef;155.09;;
abc;cef;155.67;143_34;
asd;;;123;
def;fgh;145.6;123.3;
def;fgh;146.55;123.3;
frg;hff;134.67;;

Successfile1
------------
abc;cef;155.67;143_34;
def;fgh;146.55;123.3;

Failfile1
-----------
frg;hff;134.67;;
yyy;fgh;134.78;35_45;

Can anyone help me with a script.