Created
November 2, 2014 14:37
-
-
Save varunyellina/b6c35a21f201438b4625 to your computer and use it in GitHub Desktop.
Zip all folders in current directory and then change their extension.
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 | |
# Here i is the variable to which foldernames are assigned. %/ removes the trailing / from the filename when zipping | |
for i in */; do zip -r "${i%/}.zip" "$i"; done | |
# Rename the above zip files to have the extension .cbr for use with Comic book readers. | |
for i in *.zip; do mv "$i" "${i%.zip}.cbr"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment