Usando o GNU awk, que possui arrays de arrays (pode requerer o gawk versão 4)
gawk '
NF { n[$1][$2] += $3 }
END {
for (name in n) {
print name ":"
for (fruit in n[name])
printf "%16s %2d\n", fruit, n[name][fruit]
}
}
'