curl 的问题



 num=1
  while [ $num -le 100 ]
      do
         echo $num
         curl -o /home/lzy/local/tmp.html  "http://218.192.170.25/hello.cgi?cameraid=$num&status=1&url=218.192.170.25/img/1.jpg"
         let num++
     done

把服务器的响应存放在/home/lzy/local/tmp.html ,但是有个问题,就是后面的数据把前面的数据覆盖掉了,最后只剩下第一百个请求返回的数据,请问怎么样才能使tmp.html 获得完整的100个请求返回的数据,谢谢

curl bash

hhsyzq 10 years, 9 months ago

 num=1
while [ $num -le 100 ]
do
echo $num
curl "http://218.192.170.25/hello.cgi?cameraid=$num&status=1&url=218.192.170.25/img/1.jpg" >> /home/lzy/local/tmp.html
let num++
done

uucon answered 10 years, 9 months ago

Your Answer