Skip to content

Instantly share code, notes, and snippets.

@ewencp
Created January 19, 2009 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ewencp/48817 to your computer and use it in GitHub Desktop.
Save ewencp/48817 to your computer and use it in GitHub Desktop.
#!/bin/bash
while [ 1 ]; do
ifconfig "$1" | grep "TX bytes" | sed "s/.*RX bytes:\([0-9]*\).*TX bytes:\([0-9]*\).*/\1 \2/" >> "$2"
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment