This commit is contained in:
xdtianyu
2015-01-27 14:00:21 +08:00
parent 1afd98180e
commit 6b347aa5b9
10 changed files with 0 additions and 0 deletions

14
zip/d2z.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
#==============================================================================
check_sub(){
SAVEIFS=$IFS # setup this case the space char in file name.
IFS=$(echo -en "\n\b")
for subdir in $(find -maxdepth 1 -type d |grep ./ |cut -c 3-);
do
echo $subdir
zip -r -0 "$subdir.zip" "$subdir"
done
IFS=$SAVEIFS
}
check_sub