I need to compare two files and output the new lines added & updates made to existing lines to a different files based on a key.
File1: (old file)
-----------------------------------------
1, abcd, 1, a, 1
2, abcd, 2, b, 2
3, bcd, 3, c, 3
File 2: (new file)
---------------------------
1, abcd, 1, a, 1
2, bcde, 4, b, 2
3, bcda, 3, d, 5
4, aard, 5, f, e
The First Column in both the files in the common primary key to look for.
Outputs Needed:
---------------------
1)NewLineAdded.txt
--------
4, aard, 5, f, e
2) UpdatedLines.txt
-------------------
2, bcde, 4, b, 2
3, bcda, 3, d, 5