Skip to content

Instantly share code, notes, and snippets.

@timander
Created August 12, 2010 18:06
Show Gist options
  • Save timander/521384 to your computer and use it in GitHub Desktop.
Save timander/521384 to your computer and use it in GitHub Desktop.
makes a directory and changes to it
# makes a directory and changes to it
function md {
if (( ${#} == 1 )); then
mkdir -p "${1}" || return 1; # return error
cd "${1}";
else
echo usage: md \"folder\";
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment