创建指定目录里所有的子目录
#########################################################################
# File Name: mkDirList.sh
# Author:
# mail: vip_13031075266@163.com
# Created Time: 2021年02月04日 星期四 22时48分27秒
#########################################################################
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage: $0 directory"
exit
fi
DIRECTORY=$1
if [ -e dirTmp.log ]
then
rm dirTmp.log -rf
fi
find $DIRECTORY -type d > dirTmp.log
while read DIR
do
echo "$DIR"
mkdir -p "./$DIR"
done < dirTmp.log