Parcourir la source

fix(details): port output with whitespaces (#4160)

jusito il y a 3 ans
Parent
commit
4c717c5b94
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      lgsm/functions/info_messages.sh

+ 1 - 1
lgsm/functions/info_messages.sh

@@ -773,7 +773,7 @@ fn_port() {
 		portname="${1}"
 		portname="${1}"
 		porttype="${2}"
 		porttype="${2}"
 		portprotocol="${3}"
 		portprotocol="${3}"
-		echo -e "${portname}\t${!porttype}\t${portprotocol}\t$(echo "${ssinfo}" | grep ${portprotocol} | grep ${!porttype} | wc -l)"
+		echo -e "${portname}\t${!porttype}\t${portprotocol}\t$(echo "${ssinfo}" | grep "${portprotocol}" | grep -c "${!porttype}")"
 	fi
 	fi
 }
 }