# malbolge and befunge mysteriously vanished... and had to be summoned anew. function dc16 { local t1 t2 str i t1=$1; shift 1 while [ -n "$1" ] do str=$str"16*" t2=$(echo "$t1 $1 $str+p"|dc) shift 1 t1=$t2 done [ -n "$t1" ]||return 1 echo $t1 } # Example # start at 0x0167a000 # end at 0x0185a2f9 # range length -> 0x001d02f9 #dc16 9 15 2 0 13 1 0 0 #dd if=device ibs=1 skip=23568384 count=1966842 | tee saved/4.png |hd|less # XXD FUNCTIONS: function xs { local par=$1 shift 1 while [ -n "$1" ] do printf " $1\n" xxd $1 | sed -ne"$par" shift 1 done } function xt { local par=$1 shift 1 while [ -n "$1" ] do printf " $1\n" xxd $1 | tail -n$par shift 1 done }