您可以使用grep选项-o,可能结合将模式更改为“.{0,10}< original pattern>.{0,10}”以查看其周围的某些上下文:
原文链接:https://www.f2er.com/bash/387222.html-o,--only-matching Show only the part of a matching line that matches PATTERN.
..或-c:
-c,--count Suppress normal output; instead print a count of matching lines for each input file. With the -v,--invert-match option (see below),count non-matching lines.