Files
scripts-github-mirror/zip/d2t.sh
xdtianyu 6b347aa5b9 fix dir
2015-01-27 14:00:21 +08:00

15 lines
380 B
Bash

#!/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
tar cf "$subdir.tar" "$subdir"
done
IFS=$SAVEIFS
}
check_sub