Date: Fri, 15 Dec 2006 08:47:25 -0500 From: Vivek Srivastav <vsrivastav@gmail.com> To: freebsd-questions@freebsd.org Subject: Need to simplify a script that makes cool trees Message-ID: <1166190445.20205.8.camel@localhost.localdomain>
next in thread | raw e-mail | index | archive | help
I may be responding a little late but just saw your post and no answers
posted. Maybe you have already sorted out your problem:
Here is a simple modification of your script. Put this function in
your .bashrc and use the tree command.
tree ()
{
dirs=${@:-.};
echo "Listing $dirs";
for i in $dirs;
do
find $i -name \* | sed -e 's,^.$,,' \
-e '/^$/d' \
-e 's,[^/]*/\([^/]*\)$,+-----\1,' \
-e 's,[^/]*/,| ,g';
done
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1166190445.20205.8.camel>
