1

add fields from different files

view story
linux-howto

http://unix.stackexchange.com – I have two files A and B with the same line count. Each of them has multiple columns. I want to sum up field 3 in file A with field in 5 file B for each line. e.g.: file A: 2769 RUT10EKl3fY 0 0.00483891 1352626500270 2 2773 0XbIZqg4v7w 0 0.00360106 1352626851193 3 2777 j1tuJt5IyUw 0 0.00460544 1352627235337 4 file B: 2769 RUT10EKl3fY 1 2773 0XbIZqg4v7w 8 2777 j1tuJt5IyUw 9 Result (1+2, 3+8, 9+4): 3 11 13 How can I achieve this? (HowTos)