网速测试curl版

for url in `cat urlfile`
do
#把下载容量设定在1MB,就不用关心这个下载文件的大小了(url都是视频文件基本都大于1MB)
speed=$(curl -r 0-1048576 -L -w %{speed_download} -o/dev/null -s "$url")
#取域名或者ip
IP=`echo $url|awk -F\/ '{print $3}'`
echo -e "$IP\t$speed" >> result.txt
done