是否有类似grep的实用程序来匹配字符串而不是行?


Answers:


18

您可以提供grep -o选项。像这样:

grep -o pattern file

提示:为此我使用的助记符是:o除匹配项外,省略所有内容)

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.