Skip to content

Instantly share code, notes, and snippets.

@rushipkar90
Created September 25, 2015 16:38
Show Gist options
  • Save rushipkar90/c85ff685400373f476a7 to your computer and use it in GitHub Desktop.
Save rushipkar90/c85ff685400373f476a7 to your computer and use it in GitHub Desktop.
getBPS-tx.sh
#!/bin/bash
for i in 1 2; do X=$Y; sleep 1; Y=$(/sbin/ifconfig eth0|grep TX\ bytes|awk '{ print $6 }'|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