For Programmers: Free Programming Magazines  


Home > Archive > AWK > March 2004 > diff in bytes









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author diff in bytes
T-Rex

2004-03-19, 8:23 pm

Is there a way to compare two binary files to determine at what byte counts
the files are different?
I finally found a random \r\n in one file where only a \n existed in the
other. My numerous file editors
don't show this...so visually the two "happy face" files always looked the
same...but they were slighly different in
size. My diff program I have failed me on this as it compares ascii line by
line. It found the difference but it reported
it as a line number, not helpful in a binary file!
I solved it with a lot of labor by using PEDIT in hexdisplay mode from an
old old Wordperfect distribution!
I was thinking...perhaps a simple awk program would do the trick (?)
I'm working in Windows 2000.
Thanks
REX


Kenny McCormack

2004-03-19, 8:23 pm

In article <dFtXb.178877$U%5.856423@attbi_s03>,
T-Rex <Rex_Bryan@csi.com> wrote:
>Is there a way to compare two binary files to determine at what byte counts
>the files are different?
>I finally found a random \r\n in one file where only a \n existed in the
>other. My numerous file editors
>don't show this...so visually the two "happy face" files always looked the
>same...but they were slighly different in
>size. My diff program I have failed me on this as it compares ascii line by
>line. It found the difference but it reported
>it as a line number, not helpful in a binary file!
>I solved it with a lot of labor by using PEDIT in hexdisplay mode from an
>old old Wordperfect distribution!
>I was thinking...perhaps a simple awk program would do the trick (?)
>I'm working in Windows 2000.


Does 2K have FC (I know '98 does) ?
FC works well enough for this task - by MS standards anyway.

Followups set.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com