I need to diff two files ignoring all whitespaces and empty/whitespace lines but for some reasons diff options I found does not do all well, it keeps showing the empty line in file1...
$ cat file1
2 nodes configured
13 resources configured
$ cat file2
2 nodes configured
23 resources configured
$ diff -ywBEZb -W 200 --suppress-blank-empty --suppress-common-lines file1 file2
13 resources configured | 23 resources configured
<
$ od -bc file1
0000000 062 040 156 157 144 145 163 040 143 157 156 146 151 147 165 162
2 n o d e s c o n f i g u r
0000020 145 144 012 061 063 040 162 145 163 157 165 162 143 145 163 040
e d \n 1 3 r e s o u r c e s
0000040 143 157 156 146 151 147 165 162 145 144 012 012
c o n f i g u r e d \n \n
0000054
$ od -bc file2
0000000 062 040 156 157 144 145 163 040 143 157 156 146 151 147 165 162
2 n o d e s c o n f i g u r
0000020 145 144 012 062 063 040 162 145 163 157 165 162 143 145 163 040
e d \n 2 3 r e s o u r c e s
0000040 143 157 156 146 151 147 165 162 145 144 012
c o n f i g u r e d \n
0000053
$ diff -ywBEZb -W 200 --suppress-blank-empty --suppress-common-lines file1 file2 | od -bc -
0000000 061 063 040 162 145 163 157 165 162 143 145 163 040 143 157 156
1 3 r e s o u r c e s c o n
0000020 146 151 147 165 162 145 144 011 011 011 011 011 011 011 011 011
f i g u r e d \t \t \t \t \t \t \t \t \t
0000040 011 040 040 040 174 011 062 063 040 162 145 163 157 165 162 143
\t | \t 2 3 r e s o u r c
0000060 145 163 040 143 157 156 146 151 147 165 162 145 144 012 011 011
e s c o n f i g u r e d \n \t \t
0000100 011 011 011 011 011 011 011 011 011 011 040 040 040 074 012
\t \t \t \t \t \t \t \t \t \t < \n
0000117
$
-B
doesn't simply ignore blank lines - it ignores changes whose lines are all blank. In your case, the trailing blank line is considered to be part of a contiguous multi-line change starting at13 resources configured