^ $和^#是什么意思?
我不明白BADIPS=$(egrep -v "^#|^$" $tDB)。你能解释一下吗?完整代码: #!/bin/bash # Purpose: Block all traffic from AFGHANISTAN (af) and CHINA (CN). Use ISO code. # # See url for more info - http://www.cyberciti.biz/faq/?p=3402 # Author: nixCraft <www.cyberciti.biz> under GPL v.2.0+ # ------------------------------------------------------------------------------- ISO="af cn" ### Set PATH ### IPT=/sbin/iptables WGET=/usr/bin/wget EGREP=/bin/egrep ### No editing below …