hi guys im running into a problem here im trying to calculate a sum a values from a field for example a hava a file caled <filename> and it has $3 fields, and i want toextract a group of values from field &1 and compute the sum of values from $3 accordingly this is my code so far...
awk -F: '{TEAMCOUNT[$2]=TEAMCOUNT[$2]+$3}
{
for ( i in TEAMCOUNT )
print TEAMCOUNT [i]" " i
}
~
at the end when i execute it it seems that keep track of the count but it prints the value repetitively i want the sript to calculate the total value for example
<keyword" <sum of total values>
<keyword_1" <sum of total values for keyword_1> and so on
guys any help or suggestion would be greatly appreciated
thanks