tags:

views:

44

answers:

1

hi all

I used the diff --ignore-all-space
in order to ignore white spaces when I do diff file1 file2

but what I need to add if I want to ignore also line spaces (text in file1 and file2 are the same but on different lines number)

because actually file1 and file2 are the same text but the text position in file1 is different from file2

for example

diff --ignore-all-space  

391a376

>         AAAAAAAA

397d381

<       AAAAAAAA

423a408

> 

Lidia

A: 

It's not related to ignoring spaces or not. If you move a line between file1 to file2 , even though it's exactly the same line, diff will detect the line has moved. Which is the result your having. So diff works. If you really don't care of the order of the lines in your files (but I doubt of it ) you can trny sort them (with the sort command ) before diffing them.

mb14