commit e98f446423f312df2c1624cbbfdf26239743be49 Author: Nikurasu Date: Wed Oct 27 18:06:11 2021 +0200 First commit diff --git a/ZipAllFoldersInDir/justZipIt.sh b/ZipAllFoldersInDir/justZipIt.sh new file mode 100755 index 0000000..e25eff7 --- /dev/null +++ b/ZipAllFoldersInDir/justZipIt.sh @@ -0,0 +1,15 @@ +#/bin/bash +compressionlevel=5 +while getopts l:h options +do + case $options in + l) compressionlevel="$OPTARG";; + h) printf "\nLittle Bash script for converting all sub-folders of a folder\n\nUsage:\n.justZipIt.sh (or your alias) [-l compression level]\n\nStandard values:\ncompression level: 5\n\n" + exit 2;; + esac +done + +for filename in */ +do + zip -$compressionlevel -r ${filename::-1}.zip $filename +done \ No newline at end of file diff --git a/ZipAllFoldersInDir/readme.md b/ZipAllFoldersInDir/readme.md new file mode 100644 index 0000000..bc9af9c --- /dev/null +++ b/ZipAllFoldersInDir/readme.md @@ -0,0 +1,3 @@ +# ZipAllFoldersInDir + +This helpfull script zips all folders of a directory \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..696f3e8 --- /dev/null +++ b/readme.md @@ -0,0 +1 @@ +# Useful bash scripts from Nikurasu \ No newline at end of file