mirror of
https://github.com/xdtianyu/scripts.git
synced 2025-11-05 10:46:11 +08:00
Create d2t.sh
This commit is contained in:
14
d2t.sh
Normal file
14
d2t.sh
Normal 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
|
||||||
|
tar cf "$subdir.tar" "$subdir"
|
||||||
|
done
|
||||||
|
IFS=$SAVEIFS
|
||||||
|
}
|
||||||
|
check_sub
|
||||||
Reference in New Issue
Block a user