多行 grep 工具 mgrep

jopen 9年前

mgrep 是一个执行多行 grep 的扩展工具。其设计目的并不是为了替换 grep,而是兼容 grep ,实现对 grep 的扩展。

 多行 grep 工具 mgrep

示例用法:

# 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

项目主页:http://www.open-open.com/lib/view/home/1346919186225