awk/testdir/t.in2

5 lines
68 B
Plaintext

{ x[substr($2, 1, 1)] += $1 }
END { for (i in x)
print i, x[i]
}