develop/linux

grep 할 때 Binary file (standard input) matches 나올 시 grep 방법

참새느님 2015. 3. 18. 13:01

grep 명령어 사용 시 Binary file (standard input) matches 혹은 Binary file (표준 입력) matches 이 나오는 이유는


많은 이유가 있겠지만 내 경우는 binary 파일이어서 안되던 경우였다.


-a 옵션을 붙이면 텍스트로 읽어서 grep을 사용 할 수 있다.


ex) cat test.log | grep -a IF-asdf-001


이런식으로 -a 옵션을 붙이면 가능하다 !!