Skip to content

Instantly share code, notes, and snippets.

@starkcoffee
Created February 8, 2011 05:55
Show Gist options
  • Save starkcoffee/815957 to your computer and use it in GitHub Desktop.
Save starkcoffee/815957 to your computer and use it in GitHub Desktop.
bash function to kill unnecessary intermediary directories
# 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