cat bbs.access.2014-05-01.log | awk ‘{print $1}‘ | sort -n | uniq -c | sort -n | tac | head -n 10
cat bbs.access.2014-05-01.log | awk ‘{print $1}‘ | sort -n | uniq -c | sort -n | tail -n 10
cat bbs.access.2014-05-01.log | awk ‘{print $9}‘ | sort -n | uniq -c
[[email protected] ~]# awk ‘{print $1}‘ access_2010-12-8.log| sort -n | uniq -c |sort -nr -k1
9 59.33.26.105
8 124.115.4.18
3 123.122.65.226
[[email protected] ~]# awk ‘{print $1}‘ access_2010-12-8.log| sort -n | uniq -c |sort -n|tac
9 59.33.26.105
8 124.115.4.18
3 123.122.65.226
NAME
tac - concatenate and print files in reverse #在反向连接和打印文件
-r, --regex
interpret the separator as a regular expression #解释分离器作为一个正则表达式
时间: 2024-10-07 05:35:19