2

I wonder if diff can ignor differences in lines with a specific word (example: CET).

Example:

9c9
<     <set name="ti_zone">CET</set>
---
>     <set name="time_zone">CET</set>

In this example I would like to ignore this difference...

If can do this, can you give me an example how?

2 Answers 2

6

diff can do this with the -I option:

diff -w -I CET file1 file2
0
0

Just pipe the output through grep.

diff .... | grep -v CET

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .