asd, qqasdf, asdfgb 라고 있을 때 grep 'asd'를 사용하면 텍스트에 asd를 포함한 모든 문자열이 출력이 되지만, 앞, 뒤에 아무것도 없는 순수 asd 단어만 있는 문자열을 출력하고 싶을땐 어떤 명령어를 사용하나요?
ex) > more asd.txt asd qqasdf asdfg asdasdasd
> grep 'asd' asd.txt asd qqasdf asdfg asdasdasd
$ grep -w 'asd' asd.txt
feel the gravity
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
grep -w
feel the gravity
댓글 달기