diff options
author | streetturtle <streetturtle@gmail.com> | 2018-01-20 21:42:28 -0500 |
---|---|---|
committer | streetturtle <streetturtle@gmail.com> | 2018-01-20 21:42:28 -0500 |
commit | 4239563581439be21de16642b12e92dbf7615310 (patch) | |
tree | 217c3c13f5b1834f88a003490d8913ee9aff5e43 /network-widget/networkio.sh | |
parent | ed3bbecb953c4b8166ca180b5fd5d49fa639114c (diff) |
update README
Diffstat (limited to 'network-widget/networkio.sh')
-rwxr-xr-x | network-widget/networkio.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/network-widget/networkio.sh b/network-widget/networkio.sh new file mode 100755 index 0000000..db3d774 --- /dev/null +++ b/network-widget/networkio.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +ACTIVE_INTERFACE="$(ip -o link show | awk '$9~/UP/{sub(":","",$2);print $2}')" + +IO="$(cat /proc/net/dev | grep ${ACTIVE_INTERFACE} | sed "s/.*://" | awk '{printf $1";"$9}')" + +echo "${IO}" |