GNU bug report logs - #72274
diff: option to ignore leading white space

Previous Next

Package: diffutils;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Wed, 24 Jul 2024 12:00:02 UTC

Severity: wishlist

Full log


Message #24 received at 72274 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Tim Chase <debian <at> tim.thechases.com>
Cc: 72274 <at> debbugs.gnu.org, Eric Deplagne <eric <at> deplagne.name>
Subject: Re: [bug-diffutils] bug#72274: option to ignore leading white space
Date: Thu, 25 Jul 2024 02:42:16 +0200
On 2024-07-24 16:57:49 -0500, Tim Chase wrote:
> On 2024-07-24 22:21, Vincent Lefevre wrote:
> > $ diff -wus <(printf "ab cd\n") <(printf " abcd \n")
> > Files /proc/self/fd/11 and /proc/self/fd/14 are identical
> 
> Doesn't even require the leading/trailing space:
> 
>  $ echo abcd > nospace
>  $ echo ab cd > space
>  $ diff -wus nospace space
>  Files nospace and space are identical
> 
> FWIW, this happens with diff(1) on FreeBSD & OpenBSD too, so it's
> not just a GNU diff(1) thing.

That's why -w is not the right option.

Contents that have been passed through HTML often get all their
leading white space removed. Hence the usefulness of an option
to ignore leading white space.

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




This bug report was last modified 326 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.