利用shell.awk.sed统计一个文件数据内容。

2025-04-24 11:57:00
推荐回答(1个)
回答1:

awk '{t=($2 + $3);a[$1]=(a[$1] + t)}END{for (i in a)print i,a[i]}' myfile

上记试试看 或许可以