日期:2014-05-16 浏览次数:20686 次
#!/bin/bash
read -p "Please input your folder name: " str
if [ "x$str" == "x" ]; then
str=u010530506
fi
echo Creating folder stu01
mkdir -p "$str/stu01"
for i in `seq -w 1 99`; do
touch "$str/stu01/stu$i"
done
touch "$str/stu01/stu100"
for i in `seq -w 2 99`; do
echo Creating folder stu$i
cp -r "$str/stu01" "$str/stu$i"
done
echo Creating folder stu100
cp -r "$str/stu01" "$str/stu100"
ls -1R "$str" > tree.txt