Created
July 10, 2013 15:44
-
-
Save seathief/5967408 to your computer and use it in GitHub Desktop.
convert tar.gz to zip in OSX
credit from http://stackoverflow.com/questions/6301885/convert-tar-gz-to-zip
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
#!/bin/sh | |
# credit from http://stackoverflow.com/questions/6301885/convert-tar-gz-to-zip | |
for f in *.tar.gz | |
do | |
rm -rf ${f%.tar.gz} | |
mkdir ${f%.tar.gz} | |
tar xvzf $f -C ${f%.tar.gz} | |
zip ${f%.tar.gz}.zip -r ${f%.tar.gz} | |
rm -rf ${f%.tar.gz} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment