12 lines
260 B
Plaintext
12 lines
260 B
Plaintext
if [ $1 = "-d" ]
|
|
then
|
|
list=`find $2 -type d -printf "%d %f\n"`
|
|
else
|
|
list=`find $1 -printf "%d %f\n"`
|
|
fi
|
|
|
|
while IFS= read -r line; do
|
|
nb=`echo $line | awk '{print $1}'`
|
|
printf '\t%.0s ' {0..$nb}
|
|
echo $line | awk '{print $2}'
|
|
done <<< "$list" |