标签:shell
#!/bin/bash mysql -h172.20.101.59 -uroot -pxxxx -e "select * from huiyewang.snto_session;"|awk -F"|" ‘{print $1}‘|awk ‘{print $3}‘|awk ‘{++S[$NF]}END{for(a in S) print a,S[a]}‘|awk ‘$2 >100 {print $1,$2}‘ >> /data/list/backlist.txt
#!/bin/bash ip=$(cat /data/list/backlist.txt|awk ‘{print $1}‘|sort|uniq) for a in $ip do iptables -I INPUT -p tcp -s $a -j DROP service iptables save done service iptables restart
本文出自 “湘江吹疯” 博客,请务必保留此出处http://xjcf00.blog.51cto.com/10170403/1642571
标签:shell
原文地址:http://xjcf00.blog.51cto.com/10170403/1642571