Hi

Thank you for your reply.

So what you are saying is that: If -I is used, and a diff is found on a line, 
all lines after, and until another matching one is found, are treated as one 
diffed chunk, thus ignoring the -I flag?

Could you please give me an example of how to use the tool. Im reposting my 
example bellow. I would like to get a diff report on row2 and nothing else


File1

row1 same

row2 diffX

row3 diffY

row4 same

row5 diffZ



File2

row1 same

row2 diffXX

row3 diffYY

row4 same

row5 diffZZ



And then the following comand to compare the files but exclude lines 3 and 5 



$ diff -I 'row3' -I 'row5' file1 file2

2,3c2,3

< row2 diffX

< row3 diffY

---

> row2 diffXX

> row3 diffYY

Regards
Marek

> Date: Wed, 12 Dec 2012 12:01:33 -0800
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Re: [bug-diffutils] Unexpected behaviour in diff tool?
> 
> -I ignores only if all the lines in the hunk are matched.
> I think that explains the behavior you observed.
                                          

Reply via email to