Calculation in Multiple files using awk
Hi All,
I have some 10 files named samp1.csv, samp2.csv,... samp10.csv
Each file having the same number of fields like,
Count, field1, field2, field3.
And a source.csv file which has three fields field1, field2, field3.
Now, i want to find the total count by taking the field1, field2, field3 as uniqueness.
Eg:
source.csv
a, b, c
b, c, a
d, e, f
samp1.csv
10, a, b, c
5, b, c, a
samp2.csv
12, a, b, c
4, b, c, a
samp3.csv
2, a, b, c
7, d, e, f
Output should be,
24, a, b, c
9, b, c, a
7, d, e, f
I am trying to achieve this. Will this be done using awk.
Let me know your inputs. Thanks.
Last edited by johnwilliams.sp; 08-06-2010 at 06:08 AM..
Reason: Alignment is not proper