Often I run into a problem, I need to create a directory using mkdir and I have to cd into it. Some times I need to create a directory structure like this: ~/code/folder/sub_folder, the folder might be missing or the code might be missing. So I found the following shell command which will mkdir with padding and changes i.e cd to the created directory.
I have a little function for that
mkdirpushd () { mkdir -p ${1} pushd ${1} }