I would like to diff two files, such that end of lines and white space be ignored. Namely, I would like diff to find no difference between d1.txt and d2.txt:
$ cat d1.txt
test1
test2
test3
test4
$ cat d2.txt
test1test2test3test4
For some reason,
diff -d -w -a --strip-trailing-cr d1.txt d2.txt
does not do the job. Any help is appreciated.
diff
implementations. Is this Linux (which one)? Unix? OSX? Irix?$ diff -v diff (GNU diffutils) 3.3 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Paul Eggert, Mike Haertel, David Hayes, Richard Stallman, and Len Tower.