github.com/benhoyt/goawk@v1.8.1/testdata/t.in2 (about) 1 { x[substr($2, 1, 1)] += $1 } 2 END { for (i in x) 3 print i, x[i] 4 }