Created
May 8, 2012 10:24
-
-
Save d3z/2634091 to your computer and use it in GitHub Desktop.
Simple function to create non-existing directories in a touch
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 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