Need to simplify a script that makes cool trees

2006-12-15 Thread Vivek Srivastav
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

Need to simplify a script that makes cool trees

2006-01-07 Thread Kristian Vaaf
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 #

Re: Need to simplify a script that makes cool trees

2006-01-07 Thread Kristian Vaaf
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

Re: Need to simplify a script that makes cool trees

2006-01-07 Thread Warren Block
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.