Please see the example input files below
Input File 1:
COl1
AAA
BBB
CCC
Output file 2:
Col1 col2 col3
AAA Cond1 1234
AAA Cond1 4567
AAA cond2 7890
AAA Cond3 9999
AAA cond2 6666
AAA cond3 1111
BBB cond1 7777
BBB cond1 8888
BBB cond3 9999
BBB cond3 1000
CCC cond1 1111
CCC cond2 4444
Required output is :
AAA cond1 sum of (1234+4567 )
AAA cond2 sum of (7890 + 6666)
AAA cond3 sum of (9999 + 1111)
BBB ....................
CCC..............
My requirement is if the the first column of the the first file matches with the first column of the second file ,then all the all the values of third numeric field should be summed up for matching second column values .
Please help me .