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
Hello!
This script produces a real sweet file and directory tree.
I am trying to simplify this -- it is too big for its own good.
I must remove all the bullshit but the -a switch.
And I'm sure the same thing could be accomplished in just a few lines.
Here is what it does:
# fs-tree
#
Here's the latest addition.
Just to give you an idea of what simplicity I'm aiming towards.
Still doesn't work though.
#!/bin/sh
#
# Read a directory or file list, then write a tree.
# $URBAN: fs-tree.sh,v 1.0 2005/10/24 15:05:09 vaaf Exp $
#
# Print files in addition to directories: -a
On Sat, 7 Jan 2006, Kristian Vaaf wrote:
Here's the latest addition.
Just to give you an idea of what simplicity I'm aiming towards.
Have you seen this? (Not mine, found on Usenet long ago.)
find ./ -type d -print | sed -e 's;[^/]*/;|;g;s;|;|;g'
That's the whole thing.