想获取日志关键字的上几行或者下几行
grep -A --后
gerp -B --前
gerp -C --前后几行
如:grep -A 2 -B 1 "tom" a.txt
andy
tom
john
mary
本当の声を響かせてよ
发布于 2019-11-13 514 次阅读
grep -A --后
gerp -B --前
gerp -C --前后几行
如:grep -A 2 -B 1 "tom" a.txt
andy
tom
john
mary
Comments | NOTHING