Created
May 1, 2015 21:16
-
-
Save samnung/ce0fc5c6728f2764fbdc to your computer and use it in GitHub Desktop.
Simple zipdiff (I have this function in my .zprofile)
This file contains hidden or 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
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