Sun Jun 21 14:37:56 2009 1 2 3
Sun Jun 21 11:47:16 2009 2 3 4
fileb:
Sun Jun 21 14:37:56 2009 1 2 3
Sun Jun 21 11:47:17 2009 33 44 55
The output is filec:
Sun Jun 21 14:37:56 2009 2 4 6
Sun Jun 21 11:47:16 2009 2 3 4
Sun Jun 21 11:47:17 2009 33 44 55
I know i can do:
awk '{A[$1" "$2" "$3" "$4" "$5"\t"]+=$6}END{for (i in A){print i" "A[i]}}' filea fileb
but this is just plus the field 6, how about field 7 and 8?
If you understand the code you're using for the first column, you should be able to sum up the other columns too. Use 2 more arrays for the other columns.