GNU bug report logs -
#20018
Question: Two txt file difference to a new txt file?
Previous Next
Reported by: H0PE <planeth0pe <at> yahoo.com.au>
Date: Fri, 6 Mar 2015 19:13:01 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
Message #7 received at control <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tag 20018 notabug
thanks
On 03/06/2015 11:28 AM, H0PE wrote:
> Hi guys,
>
>
>
> I'm having hard timewith diffutils and I need your help. What I've done is:
[Your mail is hard to read in plain text, due to missing spaces in
various places. Writing html mail is frowned upon in technical lists,
and doing the mail in plain text to begin with can avoid some
embarrassment when the list automatically converts your html into plain
text.]
>
> diff -n -a before.txtafter.txt >diff.txt
This creates a binary diff in ed-script format.
> Issues I got -and Ican't figure out-:
>
> 1.)How to get rid ofthe > characters from the beginning -so diffutil wouldn't evenwrite it to there in the first place-?
You don't. The output is correct for what you asked for. Rather, it
sounds like you DON'T want to do a binary diff, but instead want to do a
content-specific diff. That is, using diffutils is the wrong tool for
what you appear to want.
There are other tools, such as hivex (low-level) and virt-win-reg (built
on top of hivex, which formats a hive file into a registry file), that
are better equipped to read registry files _as structured data_, rather
than diffutils' approach of a raw binary byte stream. Using tools like
this can generate usable registry scripts that represent the difference
between two hive files. For a demonstration, read Rich Jones' blog:
https://rwmj.wordpress.com/2011/06/05/tip-using-a-backing-file-to-record-file-and-registry-changes-part-3/
>
> 2.)I dont want toinclude diffutil difference notes to the file (e.g.: 3424a3425,3429)
Again, it sounds like you are using the wrong tool.
>
> 3.)Why diffutil addspaces after every damn character? I can't figure out how to get rid of this-so diffutil wouldn't add a space after every character-
That's because the hive format uses UTF-16 characters (where ASCII
characters are represented by the two-byte sequence of the ASCII byte
and a NUL byte, which your viewer is rendering as a space). When using
diffutils to compare hive files, you are seeing raw UTF-16 streams, and
NOT the typical registry files (which can be written in pure ASCII).
As you have not demonstrated any bug in diffutils, I'm closing this bug
report. Hopefully, by pointing you at higher level tools more suited to
your task, I've helped you figure out the difference between binary
diffs (diffutils' specialty) and structured diffs (hivex' specialty).
Good luck, and feel free to ask more questions on the topic even though
the bug is closed, although the answer on this list may merely be
redirecting you over to the hivex list.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 10 years and 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.