Created
May 13, 2012 17:12
-
-
Save nogweii/2689343 to your computer and use it in GitHub Desktop.
A script that will measure how fast, over time, a file was downloaded (CSV)
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
wget http://URL/BIG_FILE -O/dev/null 2>&1 1>/dev/null | awk '/^ / { speed=$8 } /^\d/ { speed = $7 } { if (NR % 500 == 0) { print "\n" } if (index($speed, "M")) { print substr($speed, 1, index($speed, "M")-1)*1024 } else if (index($speed, "K")) { print substr($speed, 1, index($speed, "K")-1) } else { print 0 } }' | tr '\n' ',' | sed "s/,,/\n/g;s/^,//" > speeds.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment