Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageIn 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 b y >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.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.