From: Siraaj Khandkar Date: Wed, 22 Sep 2021 20:10:27 +0000 (-0400) Subject: Fix parsing exe paths containing slashes X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=e99563b8e2adeeceee280971e6ab6a550b20c91e;p=khome.git Fix parsing exe paths containing slashes --- diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 4ed67ba..a7bcf45 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -670,7 +670,7 @@ status() { printf '%sTCP: ' "${indent_unit}${indent_unit}" sudo -n netstat -tnp \ | awk 'NR > 2 && $6 == "ESTABLISHED" {print $7}' \ - | awk -F/ '{print $2}' \ + | awk '{sub("^[0-9]+/", ""); print}' \ | sort -u \ | xargs \ | column -t