From e99563b8e2adeeceee280971e6ab6a550b20c91e Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 22 Sep 2021 16:10:27 -0400 Subject: [PATCH] Fix parsing exe paths containing slashes --- home/lib/login_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1