cd /etc/squid/
SQUID=/etc/squid/squid.conf
WORD="acl blockclients src 192.168.5.0/255.255.255.0"
WORD1="acl banned src "/etc/squid/our_512kbps.txt""
WORD2="http_access deny banned"
WORD3="http_reply_access deny banned"
WORD4="http_access allow blockclients"
WORD5="http_reply_access allow all"
sed -i "s/LINE1/&\n$WORD/" $SQUID
sed -i "s/LINE2/&\n$WORD1/" $SQUID
sed -i "s/LINE3/&\n$WORD2/" $SQUID
sed -i "s/LINE4/&\n$WORD3/" $SQUID
sed -i "s/LINE5/&\n$WORD4/" $SQUID
sed -i "s/LINE6/&\n$WORD5/" $SQUID
我是Shell编程新手,请任何人帮助我
我在这条线上遇到错误
WORD="acl blockclients src 192.168.5.0/255.255.255.0"
喜欢
./internetblock.sh: line 7: blockclients: command not found
sed: -e expression #1, char 30: unknown option to `s'