'일치하는 단어 검색'에 해당되는 글 1건

  1. 2010.02.01 grep에서 정확하게 찾기
Linux2010. 2. 1. 15:30

메모장이나 각종 텍스트 에디터에서 지원하는
"완전히 일치하는 단어" 검색은 grep 에서 -w 옵션을 사용하면 된다.

-w, --word-regexp
    Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore.

[링크 : http://linux.die.net/man/1/grep]

[링크 : http://www.unix.com/unix-dummies-questions-answers/42144-find-exactly-word-grep-command.html]
Posted by 구차니