#!/bin/sh
if test "$2" = ""; then
echo "Usage: $0 basedir depth"
exit 1
fi
if test "$2" = "0"; then
exit 0
fi
for i in a b c d e f ; do
path="$1/$i"
mkdir $path || exit 1
sh $0 $path `expr $2 - 1` #这里:)
done
shell 递归调用自己
最新推荐文章于 2023-09-21 17:30:06 发布