Skip to content

Instantly share code, notes, and snippets.

@JacobDorman
Created April 25, 2016 02:53
Show Gist options
  • Save JacobDorman/766a72c502344106dc4efd6cd69dea5e to your computer and use it in GitHub Desktop.
Save JacobDorman/766a72c502344106dc4efd6cd69dea5e to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
#####
# Tests all speedtest locations
# - except australia
# - in reverse order of distance
#
#TODO determine bandwidth usage of each run
#TODO store results
#TODO more explicit
#####
set -e
while read s; do
ID=$(echo $s | cut -f1 -d "#" -)
NAME=$(echo $s | cut -f2 -d "#" -)
echo
echo "-------------------------"
echo "$NAME"
echo "> st --simple --share --server $ID"
echo
speedtest_cli --simple --share --server $ID
sleep 10
done < <(speedtest_cli --list \
| gsed -r '/(Australia|Retrieving)/c\' \
| gsed 's/) / #/' \
| tac )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment