I wonder if the following case is possible in Unix using the diff function.
Let's say that I have one line
1234 1 2
and one file containing
1234 2 3
1234 represents the pid, 2 the disk usage and 3 the cpu usage for example. Is it possible, using the diff function, to 'merge' my line with the line in the file, and to apply a sum function on the fly to have the following final output? (pid being the merge key)
1234 3 5
(3 being the sum of 1 and 2, 5 being the sum of 2 and 3)