From b99c948d92bcf666dd8829c443c8f2d235e9dcc9 Mon Sep 17 00:00:00 2001 From: redrainl <61587864+redrainl@users.noreply.github.com> Date: Fri, 10 Feb 2023 23:06:19 +0800 Subject: [PATCH] Update speedtest_bestv.sh --- speedtest/speedtest_bestv.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/speedtest/speedtest_bestv.sh b/speedtest/speedtest_bestv.sh index 31a4b6bae..3250fe169 100644 --- a/speedtest/speedtest_bestv.sh +++ b/speedtest/speedtest_bestv.sh @@ -1,5 +1,7 @@ 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) @@ -7,11 +9,10 @@ while read line; do 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