사용자 도구

사이트 도구


linux:grep

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
linux:grep [2019/05/01 22:29]
kwon37xi
linux:grep [2021/08/24 13:54]
kwon37xi
줄 2: 줄 2:
  
 ===== 특정 파일명에서 문자열 찾기 ===== ===== 특정 파일명에서 문자열 찾기 =====
-  * [[http://www.cyberciti.biz/faq/unix-linux-grep-include-file-pattern-recursive-example/|grep include file pattern recursive example]]<code sh>+<code sh> 
 +# 현재 디렉토리 파일 한정 
 +grep <pattern> <file> 
 +</code> 
 + 
 +  * [[http://www.cyberciti.biz/faq/unix-linux-grep-include-file-pattern-recursive-example/|grep include file pattern recursive example]] 
 +<code sh> 
 +# 하위 디렉토리를 포함하려면 -R --include=GLOB 을 사용
 # grep -R --include=GLOB "pattern" /path/to/dir # grep -R --include=GLOB "pattern" /path/to/dir
 grep -R --include="*.txt" "pattern" /path/to/dir grep -R --include="*.txt" "pattern" /path/to/dir
줄 42: 줄 49:
 ===== grep 대체 ===== ===== grep 대체 =====
   * [[linux:ack|ack - beyond grep]]   * [[linux:ack|ack - beyond grep]]
 +  * [[linux:silver_searcher|The Silver Searcher - ag]]
   * [[https://github.com/ggreer/the_silver_searcher|The silver searcher]]   * [[https://github.com/ggreer/the_silver_searcher|The silver searcher]]
   * [[https://github.com/monochromegane/the_platinum_searcher|The Platinum searcher]]   * [[https://github.com/monochromegane/the_platinum_searcher|The Platinum searcher]]
   * [[http://betterthanack.com/|Better Than Ack]]   * [[http://betterthanack.com/|Better Than Ack]]
linux/grep.txt · 마지막으로 수정됨: 2023/05/15 17:03 저자 kwon37xi