Skip to content

Instantly share code, notes, and snippets.

@geekrelief
Created April 26, 2009 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geekrelief/102122 to your computer and use it in GitHub Desktop.
Save geekrelief/102122 to your computer and use it in GitHub Desktop.
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment