Created
October 26, 2013 02:54
-
-
Save chsh/7164782 to your computer and use it in GitHub Desktop.
Check internet connection speed using curl's result. :-)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# clear log | |
cat /dev/null > speed.log | |
for i in {0..15} | |
do | |
echo "Starting $i/15" | |
echo "speedtest server" >> speed.log | |
date >> speed.log | |
curl -w '%{size_download},%{speed_download}' -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip >>speed.log | |
echo "" >>speed.log | |
echo "colish server" >> speed.log | |
date >> speed.log | |
curl -w '%{size_download},%{speed_download}' -o /dev/null http://colish.net/test10.zip >>speed.log | |
echo "" >>speed.log | |
echo "Finished $i/15" | |
echo "Sleeping 60 seconds." | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment