[root@db1 ~]# cat webip.sh
clear
echo "-------------------- WEB ip number: -----------------------------"
ddd='/var/log/httpd/my_access.log'
date
aa=`date +%d/%b/%Y`
echo "INPUT query date(eg:07/Apr/2010):"
echo ""
read aa
cat $ddd |grep $aa|awk '{print $1}'|sort|uniq -c |sort -n|grep -v "192.168"|grep -v "172.20"|grep -v "::1"|wc -l
echo "---------------------"
cat $ddd |grep $aa|awk '{print $1}'|sort|uniq -c |sort -n|grep -v "192.168"|grep -v "172.20"|grep -v "::1"
bbb=`cat $ddd |grep $aa|awk '{print $1}'|sort|uniq -c |sort -n|grep -v "192.168"|grep -v "172.20"|grep -v "::1"|wc -l`
echo "------------------------------$bbb------------------------------------"
本文转自 jxwpx 51CTO博客,原文链接:http://blog.51cto.com/jxwpx/293029,如需转载请自行联系原作者