The bash function I should have written years ago

I bet you nine times out of ten when you mkdir whatever, the next thing you do is cd whatever. Add this to your bash profile.

function mcd() {
    mkdir $1
    cd $1
}

Run mcd whatever at the shell prompt, and you’ll find yourself in a brand new directory called whatever.