help-gnu-utils
[Top][All Lists]
Advanced

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

Re: single line diff


From: Jim Meyering
Subject: Re: single line diff
Date: Thu, 15 Feb 2007 14:30:15 +0100

"chrolson@gmail.com" <chrolson@gmail.com> wrote:
> I have a configuration file that contains a VERY long line.  When I do
> a regular diff on versions of this file, it's very difficult for me to
> tell where the difference is coming from on that single line.  Are
> there any tools out there to tell me what the differences are for a
> long single line?

Filter both inputs through a program like fmt or "recode ../QP"
that can split long long lines into more manageable pieces.

E.g., comparing two 800-byte strings that differ only in the last byte:

  $ diff -u0 \
      <(printf %0800d 0|recode ../QP) \
      <(printf %0800d 1|recode ../QP)
  --- /proc/self/fd/11    2007-02-15 14:29:25.836262565 +0100
  +++ /proc/self/fd/17    2007-02-15 14:29:25.824262839 +0100
  @@ -11 +11 @@
  -00000000000000000000000000000000000000000000000000=
  +00000000000000000000000000000000000000000000000001=
  [Exit 1]




reply via email to

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