27.19.74.143##2016-05-30 17:38:20#GET /static/image/common/faq.gif HTTP/1.1##200##1127
110.52.250.126##2016-05-30 17:38:20#GET /data/cache/style_1_widthauto.css?y7a HTTP/1.1##200##1292
27.19.74.143##2016-05-30 17:38:20#GET /static/image/common/hot_1.gif HTTP/1.1##200##680
[root@splunk01 20200323_day01]# sed "s/##/#/g" ./test | cut -f1 -d"#"
正序:从小到大(sort -n)
[root@splunk01 20200323_day01]# sed "s/##/#/g" ./test | cut -f1 -d"#" |sort |uniq -c |sort -n
倒序:从大到小(sort -rn)
[root@splunk01 20200323_day01]# sed "s/##/#/g" ./test | cut -f1 -d"#" |sort |uniq -c |sort -rn
统计行 (wc -l)
[root@splunk01 20200323_day01]# sed "s/##/#/g" ./test | cut -f1 -d"#" |sort |uniq -c |wc -l