feat(查找cf最优ip): 增加数量选择

pull/534/merge
mack-a 2020-07-31 10:48:21 +08:00
parent 61a24a70f8
commit 3e9170c133
1 changed files with 7 additions and 2 deletions

View File

@ -49,7 +49,7 @@ echoContent(){
}
pingTool(){
echo ''>/tmp/ping.log
echoContent yellow "一共${#ip[*]}个IP大约耗时`expr ${#ip[*]} \* ${num} / 60`分钟"
echoContent yellow "一共${#ip[*]}个IP每个ip测试${num}次,大约耗时`expr ${#ip[*]} \* ${num} / 60`分钟"
echoContent yellow "可以中途Ctrl+c这样只会计算、统计已经记录下来的"
for ((i=0;i<${#ip[*]};i++))
do
@ -99,7 +99,12 @@ init(){
echoContent green "请输入单个ip的测试次数【默认为5次】"
echoContent red "============================================="
read testNum
if [[ "$testNum" =~ ^[1-9]+$ ]]
then
num=${testNum}
else
echoContent red '使用默认'
fi
pingTool
}
checkSystem(){