Skip to content

Instantly share code, notes, and snippets.

@orangecms
Created October 11, 2025 20:16
Show Gist options
  • Save orangecms/d9f35153dd565b2b092dc7696a03c1fd to your computer and use it in GitHub Desktop.
Save orangecms/d9f35153dd565b2b092dc7696a03c1fd to your computer and use it in GitHub Desktop.
bdiffstat
#!/bin/sh
DIFF=`cmp -l "$1" "$2" | wc -l`
SIZE=`ls -l "$1" | awk '{print $5}'`
STAT=`echo | awk "{print 100*$DIFF/$SIZE}"`
echo "$DIFF / $SIZE bytes differ (${STAT}%)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment