常用AWK
<!-- lang: shell -->
shell> awk -F: ‘{ count[$2”:”$3]++ } END { for (minute in count) print minute, count[minute] }’ /path/to/log | sort > count.log
常用AWK
<!-- lang: shell -->
shell> awk -F: ‘{ count[$2”:”$3]++ } END { for (minute in count) print minute, count[minute] }’ /path/to/log | sort > count.log
转载于:https://my.oschina.net/HankCN/blog/115975