Skip to content

Instantly share code, notes, and snippets.

@gg7
Created April 9, 2018 15:15
Show Gist options
  • Save gg7/5e776883947c066c4bc1f472877c4c17 to your computer and use it in GitHub Desktop.
Save gg7/5e776883947c066c4bc1f472877c4c17 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
empty_regex='\s1500\s+0\s+0\s+0\s+0\s+0\s+0\s+0\s+0\s+0\s+BMU'
o=$(sudo cl-netstat | grep -Pv "$empty_regex")
echo "$o" | grep -P '^(Iface|---)'
echo "$o" \
| grep -Pv '^(Kernel|Iface|---)' \
| grep -Pv '^\s*$' \
| sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment