Skip to content

Commit

Permalink
Update speedtest_bestv.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
redrainl authored Feb 10, 2023
1 parent c6e8399 commit b99c948
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions speedtest/speedtest_bestv.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
rm -f speedtest_bestv.log
i=0
while read line; do
i=$(($i+1));
ip=$line
date1=$(date +%Y%m%d%H)
a=$(date +%s)
a=${a:0:9}
a=`expr $a - 7`
url2="$date1/$a.ts"
url="http://$ip/liveplay-kk.rtxapp.com/live/program/live/cctv1hd8m/8000000/$url2"
echo $url
curl $url --connect-timeout 2 --max-time 15 -o /dev/null >dl.log 2>&1
a=$(tail -n 1 dl.log|awk '{print $NF}')
echo "$ip $a">> speedtest_bestv.log
echo "$i个: $ip $a"
echo "$ip $a">> speedtest_bestv.log
done
cat speedtest_bestv.log |grep M|awk '{print $2" " $1}'|sort
cat speedtest_bestv.log |grep M|awk '{print $2" " $1}'|sort -r |head -n 10

0 comments on commit b99c948

Please sign in to comment.