bug-diffutils
[Top][All Lists]
Advanced

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

[bug-diffutils] diff on partial lines?


From: Mathias Koerber
Subject: [bug-diffutils] diff on partial lines?
Date: Thu, 08 Sep 2011 20:02:46 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

Is there an option to have gdiff only consider a part of a line
(specified either as: before/after/between occurrances of a given
delimiter, or from/up-to a given character position etc) of a line
(but then to show the complete line(s) in the output)?

I currently have files to compare that include timestamps (which are
known to have changed). I would like to compare everything but the
timestamps. I can use tools like 'cut' or so to easily move them around
(to the back) of a line, but diff would have to ignore them there. I
still need to see the timestamp in the diff output though, it just
should not be the sole determinator for a changed line..

The alternative is of course to write a perl script to
split the data, compare only the important parts, but that would need
adjustments for each use and not be as performant as I suspect a
built-in ability to only consider certain parts of a line would be.



reply via email to

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