Files
Misc-Scripts/run-all-speedtests.sh

24 lines
575 B
Bash
Executable File

#!/usr/bin/env bash
if [ -d /opt/idssys/defaults ]; then
source /opt/idssys/defaults/colors.inc
source /opt/idssys/defaults/default.inc
else
source /dev/stdin <<< "$(curl -sL http://go.scity.us/colorsinc)"
source /dev/stdin <<< "$(curl -sL http://go.scity.us/defaultinc)"
fi
echo
echo -e "${idsCL[LightGreen]}Run All Local Speedtests${idsCL[Default]}"
echo
local_servers=$(speedtest -L)
local_servers=(${local_servers//$'\n'/ })
for serverID in ${local_servers[@]}; do
sid='^[[:digit:]]{4,6}$'
[[ ${serverID} =~ ${sid} ]] && speedtest -s ${serverID}
done
exit 0