章世超吧 关注:2贴子:114
  • 1回复贴,共1
#!/bin/sh
list()
{
cd $1
ls -l
for i in $(ls $1)
do
if [ -d $i ]
then
directory="$1/$i"
echo "The directory $directory is a subdirectory of $1, which includes:"
list $directory
cd $1
fi
done
}


IP属地:浙江1楼2015-09-02 23:49回复
    #!/bin/sh
    list()
    {
    cd $1
    ls -l
    for i in $(ls $1)
    do
    if [ -d $i ]
    then
    directory="$1/$i"
    echo "The directory $directory is a subdirectory of $1, which includes:"
    list $directory
    cd $1
    fi
    done
    }
    read $1
    list


    IP属地:浙江2楼2015-09-03 00:04
    回复