有没有办法让grep输出"单词"来自与搜索表达式匹配的文件?
如果我想在许多文件中找到所有实例,比如"th",我可以这样做:
grep "th" *
Run Code Online (Sandbox Code Playgroud)
但是输出会是这样的(粗体是我的);
some-text-file : the cat sat on the mat some-other-text-file : the quick brown fox yet-another-text-file : i hope this explains it thoroughly
我希望它使用相同的搜索输出是:
the
the
the
this
thoroughly
Run Code Online (Sandbox Code Playgroud)
这可能使用grep吗?或者使用其他工具组合?