Created
October 16, 2017 03:21
-
-
Save grahamcrowell/3c8157c0151dbd6942c9cca24798c55a to your computer and use it in GitHub Desktop.
shell internet speed test
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
| # script=speedtest.sh && touch $script && sudo chmod 777 $script && vi $script && printf "running: %s\n" $script && ./$script | |
| echo "***********************" | |
| echo "internet speed test..." | |
| echo "***********************" | |
| printf "\n===================================\n" | |
| printf "installing... speedtest-cli\n" | |
| printf "===================================\n" | |
| speedtest-cli --version | |
| # brew install speedtest-cli | |
| # sudo apt install speedtest-cli | |
| printf "===================================\n\n" | |
| hostname="HOME-mac" | |
| hostname="HOME-linux" | |
| printf "\n===================================\n" | |
| printf "starting internet speed test . . . (~30 seconds)\n" | |
| out="net_speed-"$hostname"-" | |
| out=$out$(date -u +"%Y-%m-%dT%H:%M")".log" | |
| printf "logging to: '%s'\n" $out | |
| printf "===================================\n" | |
| speedtest-cli | tee $out | |
| printf "===================================\n\n" | |
| printf "\n***********************\n" | |
| printf "test complete. see log at:\n%s/%s\n" $PWD $out | |
| printf "***********************\n\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment