grep时候显示行号和匹配内容前后几行内容

1
2
3
A  after  内容后n行
B  before  内容前n行
C  count?  内容前后n行

例如:

1
grep -rn 3 -B1 -A1 test.txt

grep