#!/bin/sh
# url: http://pank.org/scripts/
# description: cmp -l output in hex
# comment: csh bash
# platform: all with gawk

#!/bin/bash
if [ -z $2 ] ; then
    echo "`basename $0` {file1} {file2}"
else
    cmp -l $1 $2 | gawk '{printf "%08X %02X %02X\n", $1-1, strtonum(0$2), strtonum(0$3)}'
fi