#!/bin/bash
[ -z $1 ] && exit 1
_P=${1%/};_HEAD="| "
NUM=$(echo $1/|grep -ro /|wc -l)
echo ${_P##*/}
find $1/* |while read Line
do
_N=$(echo $Line|grep -ro /|wc -l)
for ((_N;_N>$NUM;_N--));do echo -n "$_HEAD";done
echo "|-- ${Line##*/}"
done
阅读(1755) | 评论(0) | 转发(0) |