shellwget获取文件类型
把所有的URL放在一个文件里,每行一个然后做一个循环,每读一行就把他赋给url变量,你再去wget 文件做相应处理即可则仔,
urlfile=/tmp/urls
for url in ◆cat $urlfile◆
do
wget "$url" -O ~/kefu/aqws1/c.txt
l=0
while read line
l=◆expr $l ◆ 1◆
c=$(echo $line | grep "版块主题" | wc -l)
if [ $c != 0 ]; then
echo "find $l"
sed "樱盯并1,${l}d" ~/kefu/aqws1/c.txt > ~/kefu/aqws1/m.txt
fi
done < ~/kefu/aqws1/c.txt