[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-diffutils] How to ignore blank lines?
From: |
Sérgio Basto |
Subject: |
Re: [bug-diffutils] How to ignore blank lines? |
Date: |
Thu, 31 Jan 2013 19:36:27 +0000 |
On Qua, 2013-01-30 at 16:30 -0600, Robert Wenner wrote:
> 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?
yeah
man diff
-B, --ignore-blank-lines ignore changes whose lines are all blank
but doesn't work ...
>
> 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
>
--
Sérgio M. B.