Skip to content

Instantly share code, notes, and snippets.

@samnung
Created May 1, 2015 21:16
Show Gist options
  • Save samnung/ce0fc5c6728f2764fbdc to your computer and use it in GitHub Desktop.
Save samnung/ce0fc5c6728f2764fbdc to your computer and use it in GitHub Desktop.
Simple zipdiff (I have this function in my .zprofile)
function zipdiff {
if [[ $# != 2 ]]; then
echo "$0: simple tool to diff zip files"
echo "usage: $0 <one-zip-file> <other-zip-file>"
return 1
fi
one=`mktemp -t 'zipdiff_1'`
two=`mktemp -t 'zipdiff_2'`
unzip -c -a "$1" > "$one"
unzip -c -a "$2" > "$two"
diff "$one" "$two"
# cleanup
rm -rf "$one" "$two"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment