Skip to content

Instantly share code, notes, and snippets.

View cjsewell's full-sized avatar

Corey Sewell cjsewell

  • Jucy Group
  • New Zealand
View GitHub Profile
@cjsewell
cjsewell / traffic.sh
Last active October 16, 2023 09:51 — forked from radu-gheorghe/traffic.sh
#!/bin/bash
#shows traffic on the specified device
function human_readable {
VALUE=$1
BIGGIFIERS=( B K M G )
CURRENT_BIGGIFIER=0
while [ $VALUE -gt 10000 ] ;do
VALUE=$(($VALUE/1000))