Last active
September 2, 2016 02:03
-
-
Save dtkav/8246705 to your computer and use it in GitHub Desktop.
dug: cd to bottom of directory tree (if you have several singly nested folders)
This file contains 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
function dug() { | |
ls -d */ >/dev/null 2>&1; | |
if [[ $? -eq 0 && `ls -d */ | wc -l` -eq 1 ]]; | |
then | |
builtin cd `ls -d */`; | |
dig; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment