Subject: Re: [bug-diffutils] bug#79240: Space inside C-strings

From: Robert Webb <[email-masked]>
Date: Fri, 15 Aug 2025 16:48:20 -0700

On Fri, Aug 15, 2025 at 1:28 AM Gisle Vanem via bug-diffutils via All
diffutils discussion. <[email-masked]> wrote:
> [...]
> So how can I use diff to *not* ignore spaces inside C-stings,
> but ignore trailing/leading spaces? A regular expression?

In bash:

  sedexpr='s/^  *//;s/  *$//'
  diff <(sed "$sedexpr" file-1.c) <(sed "$sedexpr" file-2.c)

-- 
Robert Webb