From 7ee0f52f2c0c03deade3af3af3b68be80e37f8b9 Mon Sep 17 00:00:00 2001 From: mitty Date: Thu, 7 Mar 2013 16:14:51 +0000 Subject: [PATCH] * add function hexcmp: compare two binary files and show differences * code from http://superuser.com/questions/125376/how-do-i-compare-binary-files-in-linux git-svn-id: https://lab.mitty.jp/svn/lab/trunk@200 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- TipAndDoc/.bashrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TipAndDoc/.bashrc b/TipAndDoc/.bashrc index 4b743ec..359a7a9 100644 --- a/TipAndDoc/.bashrc +++ b/TipAndDoc/.bashrc @@ -42,6 +42,10 @@ function svnst { svn st $@ | grep "^[^?]" } +function hexcmp { + cmp -l $@ | awk '{printf "%08X %02X %02X\n", $1-1, strtonum(0$2), strtonum(0$3)}' +} + alias vi='vim' alias sudo='sudo -H ' alias rm='rm -v' -- 1.7.9.5