Skip to content

Instantly share code, notes, and snippets.

@rushipkar90
Created September 25, 2015 16:37
Show Gist options
  • Save rushipkar90/11f9c081365744e7486e to your computer and use it in GitHub Desktop.
Save rushipkar90/11f9c081365744e7486e to your computer and use it in GitHub Desktop.
getBPS-rx.sh
#!/bin/bash
for i in 1 2; do X=$Y; sleep 1; Y=$(/sbin/ifconfig eth0|grep RX\ bytes|awk '{ print $2 }'|cut -d : -f 2); echo "$(( Y-X ))"; done | tail -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment