하늘은언제나나의편
2017년 9월 20일 수요일
check if ip is open - nc
#!/bin/bash
nc -z $1 $2 1>/dev/null 2>&1; result=$?;
if [ $result -eq 0 ]; then
echo 'the port is open for tcp connections'
else
echo 'the port was closed'
fi
댓글 없음:
댓글 쓰기
최근 게시물
이전 게시물
홈
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기