多行 grep 工具 mgrep
mgrep 是一個執行多行 grep 的擴展工具。其設計目的并不是為了替換 grep,而是兼容 grep ,實現對 grep 的擴展。
示例用法:
# Search for lines with "Romeo" in the file shakespeare-romeo_and_juliet: mgrep Romeo shakespeare-romeo_and_juliet # Count the number of include directives in each .cc file: mgrep -c '#include' *.cc # List those files that have "John Doe" in them, regardless of capitalization: mgrep -il 'John Doe' *.cc
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!