如何用awk命令提取文件中的某一列并统计该列中某个数字出现的次数?

2025-05-13 17:48:57
推荐回答(1个)
回答1:

awk '{cnt[($3>100?100:$3)]++} END{for(key in cnt) print key ":" cnt[key]}' file