service nscd stop
#!/bin/bash
a=`date +%F-%H-%M`;
while read LINE;
do
sed -i "1s/^.*$/$LINE/" /etc/hosts;
mkdir /home/webscan/logs/$a;
wget www.xxx.com -O /home/webscan/logs/$a/$LINE.html;
done < /home/webscan/hosts
b=`grep 'xxxxx' /home/webscan/logs/$a/*|wc -l`;
echo $b;
if [ "$b" != "16" ]
then
echo 'hello!' | mailx -s "test" 632117384@qq.com;
fi
#!/bin/bash
a=`date +%F-%H-%M`;
while read LINE;
do
sed -i "1s/^.*$/$LINE/" /etc/hosts;
mkdir /home/webscan/logs/$a;
wget www.xxx.com -O /home/webscan/logs/$a/$LINE.html;
done < /home/webscan/hosts
b=`grep 'xxxxx' /home/webscan/logs/$a/*|wc -l`;
echo $b;
if [ "$b" != "16" ]
then
echo 'hello!' | mailx -s "test" 632117384@qq.com;
fi