I have two csv files like below that I'd like to merge - more or less using the first column ID_ as the unique identifier, and append the AMT column to a new row in the final file.
CSV1
ID_ CUSTOMER_ID_ EMAIL_ADDRESS_
1090 1 example1@example.com
1106 2 example2@example.com
1145 3 example3@example.com
1206 4 example4@example.com
1247 5 example5@example.com
1254 6 example6@example.com
1260 7 example7@example.com
1361 8 example8@example.com
1376 9 example9@example.com
CSV2
ID_ AMT
1090 5
1106 5
1145 5
1206 5
1247 5
1254 65
1260 5
1361 10
1376 5
Here's what I'm looking for in a final file:
ID_ CUSTOMER_ID_ EMAIL_ADDRESS_ AMT
1090 1 example1@example.com 5
1106 2 example2@example.com 5
1145 3 example3@example.com 5
1206 4 example4@example.com 5
1247 5 example5@example.com 5
1254 6 example6@example.com 65
1260 7 example7@example.com 5
1361 8 example8@example.com 10
1376 9 example9@example.com 5
I've tried modifying a this below as much as possible, but not able to get what I'm looking for. Really stuck on this - not sure what else I can do. Really appreciate any and all help!
join -t, File1.csv File2.csv
Data shows in this example contains tabs, but my actual files are CSVs as mentioned and will contain commas as a separator.