I have two csv files where I want to figure out the deleted, modified and added lines. (The first field is an unique id.)
The first file looks like:
0, WILL_BE_REMOVED 1, OLD 2, SAME 3, SAME
and a newer csv file:
1, CHANGED 2, SAME 3, SAME 4, ADDED 5, ADDED
I was thinking that
diff might tell me that, yet when I run:
diff newer_file.csv older_file.csv 1c1,2 < 1, CHANGED --- > 0, WILL_BE_REMOVED > 1, OLD 4,5c5 < 4, ADDED < 5, ADDED --- >
I see a changed line similar as an added line. Is there a way to distinguish between changes and additions?
Can I achieve what I want with diff? If not, could some other bash tool fit my use case?
DELETED: 0, WILL_BE_REMOVED UPDATED: 1, CHANGED ADDED 4, ADDED 5,