Thursday, March 24, 2011

Option in diff to show differences in lines that include a certain word

Hello all,

Is there any way using diff to show differences only in lines that include an specific word?.

Thank you.

From stackoverflow
  • You can specify the option '-I regexp' to ignore the lines which match the specified regular expression. If you inverse the regex, you can ignore all lines NOT containing the word you're looking for.

    See the diff manpage for more info or here for a specific example.

    Eduardo : How can I inverse the regex?, I looked around he man page, but I could figure out how to do that.

0 comments:

Post a Comment