【命令学习】grep

来源:互联网 发布:数据分析的道与术 ppt 编辑:程序博客网 时间:2024/05/21 16:55

 

grep 有这样的一个参数  -A (After) 和 -B (Before)

 

man grep  可以看到该参数的解释:

 

-A NUM, --after-context=NUM
              Print  NUM lines of trailing context after matching lines.  Places a line containing -- between contiguous groups of matches.

 

-B NUM, --before-context=NUM
              Print NUM lines of leading context before matching lines.  Places a line containing -- between  contiguous groups of matches.

 

 

原创粉丝点击