Created
February 16, 2015 11:03
-
-
Save mathew-hall/d2e8edb8c69451849298 to your computer and use it in GitHub Desktop.
Generate a histogram of all hex bytes for a file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xxd -c 1 $1 | cut -d " " -f 2,3,4 | sort | uniq -c | perl -p -e 's/^\s+//; $_ =~ /(\d+)\s+([a-f\d]{2})\s+(.+)/; $_="$2 $3"."*"x$1."$1\n";' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment