File name:Tree(executable)
#!/bin/bash
for i in $*
do
if [ -d $i ]; then
echo "===================$i================" >> ?????
tree -L 1 $i >> ?????
fi
done
As you see, I want to list the tree structure of the parameters that I input,I want to let all the tree structure redirect to the last file(it's id is $#),it is "?????" in this script,because I do not know how to write it.
For example:
./Tree ./* README
YES,all directory tree structure will write in README!
./Tree ./* > README. That way they could view the output on screen or pipe it tolessor what have you.