I have two files and I want to merge them in a way when some specific columns are the same, export those lines with all fields except one column, which to be the subtraction of the two files in that specific column.
For example, I have two files as follows and I want to output the lines where columns 1 to 3 are the same, and with column 4 equal to the subtraction of the two values in the files' column 4(File1 - File2).
File 1:
10 20 30 50
100 200 300 850
150 250 350 900
.....
FIle2:
100 200 300 840
15 25 35 55
150 250 350 880
....
output:
100 200 300 10
150 250 350 20
....