Created
April 29, 2016 10:01
-
-
Save jostyee/bec69014807a1ebe25428122b2e94ff4 to your computer and use it in GitHub Desktop.
compress all folders in current directory into their own zip files & then delete originals
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
#!/bin/sh | |
for d in $(find . -maxdepth 1 -type d) | |
do | |
if [ $d != '.' ]; then | |
echo -ne "$d " | |
zip -r -m "$d.zip" "$d" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment