我正在使用 grep 来执行此操作,例如:
grep someText file.log
但这会在结果中返回完整的行。如果someText在一行的中间找到,我不想输出整行,只输出someText. 有没有办法实现这一目标?
someText
linux grep text-processing
grep ×1
linux ×1
text-processing ×1