Last active
July 12, 2024 00:41
-
-
Save okurka12/fd3978931d45dee017ff975c74af1362 to your computer and use it in GitHub Desktop.
a bash function to mkdir & cd
This file contains hidden or 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
# | |
# a bash function to mkdir and cd | |
# add to the end of .bashrc | |
# | |
# author: vit pavlik | |
# | |
# command to change directory to a directory that doesnt exist yet | |
cdd () { | |
if [ ! -d "$1" ]; then | |
mkdir -p -- "$1" | |
fi | |
cd -- "$1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment