I am looking for an application that will diff two files, and actually ignore all whitespace, so for example:
class foo {
bar
spaz
}
is equally equivilant to
class foo{bar spaz}
or, as well
classfoo {
barspaz}
but NOT
classfoo {
spazspaz
}
i.e. it would show me that spaz
in the previous example has taken the place of bar
in any of the other examples. It only needs to compare 2 files.
- It can be a windows or linux/unix/posix-compatible utility
- I've tried the lin/unix
diff -w
command, it only ignores whitespace if the difference per-line is whitespace. I don't see an option to totally ignore whitespace. - I also tried UECompare or Ultracompare, a non-free comparison utility for windows.
diff
compares files line by line. The newlines serve as delimiters for the changes. Without them it would be hard to do a meaningful comparison. shurane's answer would work, but it is less than useful for the reason set out in the comments.diff
the results. That would generate lots of lines of output for large chunks of differences, though. I think you'd need a new program (or adiff
flag) to compare files without treating linebreaks specially.