📜  grep 之前和之后的行 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:36.784000             🧑  作者: Mango

代码示例1
You can use the -B and -A to print lines before and after the match.

grep -i -B 10 'error' data
Will print the 10 lines before the match, including the matching line itself.