Created
December 17, 2016 10:12
-
-
Save fcaldarelli/f2c7de11cfbce6f2e14143b274dd482e to your computer and use it in GitHub Desktop.
/usr/local/bin/tree console command for mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SEDMAGIC='s;[^/]*/;|____;g;s;____|; |;g' | |
if [ "$#" -gt 0 ] ; then | |
dirlist="$@" | |
else | |
dirlist="." | |
fi | |
for x in $dirlist; do | |
find "$x" -print | sed -e "$SEDMAGIC" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment