Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法使用diff仅在包含特定单词的行中显示差异?
您可以指定选项“-I regexp ”以忽略与指定正则表达式匹配的行。如果您反转正则表达式,您可以忽略所有不包含您要查找的单词的行。
有关更多信息,请参阅diff 手册页或此处获取特定示例。