Need to find a Unix based command, program or utility to compare two binary files and find out the differnces. The basic Unix commands, cmp, diff, or comm do not work properly with binary files [sig][/sig]
What kind of binaries are they Colleen? Are they executables? [sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href=
No they are ISAM based datafiles where the data is stored in a binary format. I need to compare an archived file to a current file and only pull the records that are new.
Thanks for the response. [sig]<p>Colleen J. Elash<br><a href=mailto:colleen@infowerks.com>colleen@infowerks.com</a><br>[/sig]
Why you can't use [tt]cmp[/tt]? This command was designed to compare non text files. Try this:
[tt]
cmp -s first_file second_file ; RCode=$?
if [ $RCode -eq 0 ]
then
echo First file and Second file are the same.
else
if [ $RCode -eq 1 ]
then
echo First and Second file are different!
else
echo An error has ocurred
fi
fi
[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.