ansi 라는 들어가는 말을 검색했더니 transition Transient fLastTransit 등등 다 검색이 되네요
1.ansi 라는 딱 이단어만 검색하려면 어찌해야 할까요?
2.Text 파일안에 위의단어즉 transition 이들어있는 라인삭제, 또, fLastTransit가 들어있는 라인삭제... 이렇게 특정 단어가 포함된 라인을 지우려면 어떻게 해야할까요?
1. grep "\<ansi\>" data.txt 2. grep -v "\<transition\>\|\<fLastTransit\>" data.txt > new_data.txt
=================================== 행동할 때 열정은 자라난다.
#grep "\ansi\" -rn * >aaaa.txt > #grep '\ansi\' -rn * >aaaa.txt grep: 따라붙는 역슬래쉬
쩝 안되네요..흑..
egrep 를 쓰시거나 grep -e 옵션을 한번 줘보세요.
임예진 팬클럽 ♡예진아씨♡ http://cafe.daum.net/imyejin
[예진아씨 피카사 웹앨범] 임예진 팬클럽 ♡예진아씨♡ http://cafe.daum.net/imyejin
grep "\<ansi\>" data.txt
grep 버전에 따라 다르게 나오나.. ㅜ.ㅜ 전 잘 나오는데요.. ㅜ.ㅜ
되네요...감사드립니다. :)
텍스트 포맷에 대한 자세한 정보
<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 "\ansi\" -rn * >aaaa.txt
>
#grep '\ansi\' -rn * >aaaa.txt
grep: 따라붙는 역슬래쉬
쩝 안되네요..흑..
egrep 를 쓰시거나 grep
egrep 를 쓰시거나 grep -e 옵션을 한번 줘보세요.
[예진아씨 피카사 웹앨범] 임예진 팬클럽 ♡예진아씨♡ http://cafe.daum.net/imyejin
\만 쓰시면 안되구요.. \< 와 \> 로 묶어줘야 하는데요..
grep "\<ansi\>" data.txt
grep 버전에 따라 다르게 나오나.. ㅜ.ㅜ
전 잘 나오는데요.. ㅜ.ㅜ
===================================
행동할 때 열정은 자라난다.
됩니다.
되네요...감사드립니다. :)
댓글 달기