Created
February 8, 2011 05:55
-
-
Save starkcoffee/815957 to your computer and use it in GitHub Desktop.
bash function to kill unnecessary intermediary directories
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
# kill unnecessary intermediary directories | |
# requires shopt -s dotglob to move hidden files | |
function kid() { | |
if [ -z "$1" ]; then | |
echo "Provide a directory you donkey" | |
return | |
fi | |
mv $1/* . | |
rmdir $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment