From c741ab9e43a4f2820eb490a42868b5bdf989fa46 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 19 Jul 2006 13:10:45 +0000 Subject: [PATCH] Fix 'hits' output with space delimiters in /etc/services -- take 2 git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4240 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/shorewall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 0b74577c9..587e860cd 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -1747,7 +1747,7 @@ case "$COMMAND" in grep "$LOGFORMAT.*DPT" $LOGFILE | sed 's/\(.*DPT=\)\([0-9]\{1,5\}\)\(.*\)/\2/' | sort | uniq -c | sort -rn | \ while read count port ; do # List all services defined for the given port - srv=$(grep "^[^#].*\\b$port/" /etc/services | cut -f 1 | cut -f 1 -d' ' | sort -u) + srv=$(grep "^[^#].*\\b$port/" /etc/services | cut -f 1 | cut -f 1 -d' ' | sort -u) srv=$(echo $srv | sed 's/ /,/g') if [ -n "$srv" ] ; then