bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] How to ignore blank lines?


From: Robert Wenner
Subject: [bug-diffutils] How to ignore blank lines?
Date: Wed, 30 Jan 2013 16:30:07 -0600
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.8; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

Hello,

is this the right place to ask about how to use diff?
If not please point me in the right direction.


How can I get GNU diff ignore the blank lines in the following
example?

File a:
--- cut here ---
x
do

done
--- cut here ---

File b:
--- cut here ---
x

do
done
--- cut here ---

Neither file has trailing white spaces in any line.

Using GNU diff 3.1 on Mac OS X I get:

diff -w a b
2d1
< do
3a3
> do

Same when I add various promising looking options:

diff --suppress-blank-empty -E -b -w -B -I '^[[:space:]]*$' --strip-trailing-cr -i a b
2d1
< do
3a3
> do

What am I missing here?

diff --version
diff (GNU diffutils) 3.1

Thanks,

Robert



reply via email to

[Prev in Thread] Current Thread [Next in Thread]