Skip to content

Instantly share code, notes, and snippets.

@d3z
Created May 8, 2012 10:24
Show Gist options
  • Save d3z/2634091 to your computer and use it in GitHub Desktop.
Save d3z/2634091 to your computer and use it in GitHub Desktop.
Simple function to create non-existing directories in a touch
function mdtouch() {
if [ ! -d `dirname $1` ]; then mkdir -p `dirname $1`; fi
touch $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment