问题一
分析日志t.log(访问量),将各个ip地址截取,并统计出现次数,并按从大到小排序(腾讯)
http://192.168.200.10/index1.html
http://192.168.200.10/index2.html
http://192.168.200.20/index1.html
http://192.168.200.30/index1.html
http://192.168.200.40/index1.html
http://192.168.200.30/order.html
http://192.168.200.10/order.html
假设存放在t.txt文件中
cat t.txt | cut -d '/' -f 3 | sort | uniq -c | sort -nr
问题二
统计连接到服务器的各个ip情况,并按连接数从大到小排序(腾讯