📜  如何使用 grep 打印下一行 - Shell-Bash 代码示例

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

代码示例4
grep -A 2 "app" mytext.txt //prints two lines after the match line
grep -B 2 "app" mytext.txt //prints two lines before the match line