Explorar o código

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

jusito %!s(int64=3) %!d(string=hai) anos
pai
achega
4c717c5b94
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lgsm/functions/info_messages.sh

+ 1 - 1
lgsm/functions/info_messages.sh

@@ -773,7 +773,7 @@ fn_port() {
 		portname="${1}"
 		porttype="${2}"
 		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
 }