geekrelief (owner)

Revisions

gist: 102122 Download_button fork
public
Public Clone URL: git://gist.github.com/102122.git
tree.sh
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
# prints a tree for the current dir or the one supplied
# if on ubuntu : sudo apt-get install tree
# if on mac : sudo port install tree
if [ "$1" == "" ]; then
eval "find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
else
eval "find $1 -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
fi