netcat 을 이용해서 서비스체크 스크립트를 작성하려는중에 보니깐... pipe 적용이 안되는것이다...
netcat은 표준에러출력값을 사용하기 때문에 아래와 같이 사용하면 된다.
netcat is writing to stderr, so redirect stderr into stdout like this:
Code:
$ nc -z -v -w 1 127.0.0.1 1-1000 2>&1 | grep -v '?'
stderr redirection 추가설명
http://revoman.tistory.com/entry/stderr-redirection