#!/bin/bash
#author:xumubin
#qq:40594324
PATH=$PATH:$HOME/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin:/root/bin
export PATH
source /home/falcon/function/var
cd $IDCROOT/idcreport
ls
echo -e "${RED}請選擇日期${RES}"
read datecheck
cd $datecheck
while read hw_list hw_down
do
grep $hw_list wgetdown.txt
grep $hw_list wgetdown.txt |sort -nt: -k 3|sed '/^.*speed :0 K/d'>/root/count.txt
awk -F '[: ]+' '{print $6}' /root/count.txt >/root/count1.txt
echo -e "$hw_list `awk -F'[: ]+' ' {sum+=$6}END{printf " average speed is %.f k/s\n",sum/NR}' /root/count.txt`"
echo -e "$hw_list min average speed is `head -n 1 /root/count1.txt` K/s"
echo -e "$hw_list min average speed is `tail -n 1 /root/count1.txt` K/s"
echo -e ""
done</home/falcon/ip_list/idcdownlist
北美測試的結果