#!/usr/bin/env bash # # Common bytes in avi files # Stop once differences COUNT=1 function helper(){ echo "SYNTAX: $0 fileone filetwo These did ought to be of the same file type" exit } if (( $# != 2 )) || [ ! -f $1 ] || [ ! -f $2 ]; then helper fi while( true ); do ONE="$(od --read-bytes=$COUNT $1)" TWO="$(od --read-bytes=$COUNT $2)" if [ "$ONE" = "$TWO" ]; then COUNT=$(($COUNT+1)) else echo "First $COUNT Identical" exit fi done