#!/bin/csh -f # hexdiff # ----------------------------------------------------------------------------- # Shell script to compare the hex dumps of 2 files. # ----------------------------------------------------------------------------- # Usage: See Usage section below or run with -h or --help option to see usage. # Assumptions: # Effects: # Notes: # Implementation Notes: # Portability Issues: # Revision History: # $Log$ # ----------------------------------------------------------------------------- if ($#argv < 2 || "$1" == "-h" || "$1" == "--help") then echo "Usage: $0:t file1 file2" exit 1 endif set timestamp = `date "+%Y_%m_%d__%H_%M_%S"` set tempfile1 = "/tmp/$0:t_$$_file1_$timestamp" set tempfile2 = "/tmp/$0:t_$$_file2_$timestamp" # -v = Verbose. Don't show * instead of one or more lines that are identical # to the previous line. #?? Perhaps look into xxd as an alternative to hexdump? Just discovered it, #?? and have not yet investigated at all. --Fred 3/25/2020 #?? Or perhaps od hexdump -v $1:q > $tempfile1:q hexdump -v $2:q > $tempfile2:q windiff $tempfile1:q $tempfile2:q rm $tempfile1:q $tempfile2:q