소스 검색

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

jusito 3 년 전
부모
커밋
4c717c5b94
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
 }