grep -A -B -C

   Linux中grep/egrep查找命令正则表达式

grep spa

--color    ###颜色着重显示命中的文件及文件件code

-n  ###显示行号  numberblog

-i   ###忽略大小写 ignoreclass

-c  ###count统计出现匹配的次数grep

-E  ###标准posix,支持正则表达式   统计

grep -E   -v   '(^$|^#)' xxxx   等价于egrep -v '(^$|^#)'  xxx

-A   n    ###after     前面多少行di

-B   n   ###before    后面多少行文件

-C   n   ###centor    先后多少行co

学而思,思儿通,通则达!

相关文章
相关标签/搜索