Skip to content

Instantly share code, notes, and snippets.

@polynomial
Created March 18, 2016 05:48
Show Gist options
  • Save polynomial/f1e52d33a906405d8df9 to your computer and use it in GitHub Desktop.
Save polynomial/f1e52d33a906405d8df9 to your computer and use it in GitHub Desktop.
while true ~
do
bytes2=$(ifconfig | grep bytes | tail -1 | awk '{print $5}')
sent=$(($bytes2 - $bytes))
bps=$(($sent * 8 / 1024 / 1024))
echo "$bps and $sent"
sleep 1;bytes="$bytes2"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment