tags:

views:

100

answers:

1

Hello all,

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

Thank you.

+2  A: 

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.

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