Want to find the rows which has been updated, deleted or inserted by comparing two csv files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Want to find the rows which has been updated, deleted or inserted by comparing two csv files

inventors
Suppose we have one file abc.csv.dat
100000114,AU79 Attract Mens Deo 150 Ml Can,100000113,AU79 Attract Mens Deo 150 Ml Can,18,_,18,Deo
100000115,AU79 Sauve Mens Deo 150 Ml Can,100000112,AU79 Sauve Mens Deo 150 Ml Can,18,_,18,Deo
100000117,AU79 Altitude Mens Deo 150 Ml Can,100000116,AU79 Altitude Mens Deo 150 Ml Can,18,_,18,Deo
100000119,DU AU79 Bandit Mens Deo 150 Ml Can,100000118,DU AU79 Bandit Mens Deo 150 Ml Can,18,_,18,Deo

Second file is xyz.csv.dat
100000114,AU79 Attract Mens Deo 250 Ml Can,100000113,AU79 Attract Mens Deo 250 Ml Can,18,_,18,Deo
100000115,AU79 Sauve Mens Deo 150 Ml Can,100000112,AU79 Sauve Mens Deo 150 Ml Can,18,_,18,Deo
100000119,DU AU79 Bandit Mens Deo 150 Ml Can,100000118,DU AU79 Bandit Mens Deo 150 Ml Can,18,_,18,Deo
100000120,AU79 Altitude Mens Deo 350 Ml Can,100000116,AU79 Altitude Mens Deo 350 Ml Can,18,_,18,Deo


I want to compare these two files using unix commands to create my unix shell scripts which will count the new rows, updated rows and deleted rows.
My sample files are small but the actual files are containing 20,000+ records.

Thanks for ur attention.
Reply | Threaded
Open this post in threaded view
|

Re: Want to find the rows which has been updated, deleted or inserted by comparing two csv files

Guru
Administrator
Please post  the sample output.