I often want to make a directory and then immediately cd
into that directory.
mkdir foo
cd foo
put the following in your .bashrc
function mcd()
{
mkdir $*
args=($*)
cd ${args[@]:(-1)}
}
and then
source ~/.bashrc
mcd -p a/b/c/d
I often want to make a directory and then immediately cd
into that directory.
mkdir foo
cd foo
put the following in your .bashrc
function mcd()
{
mkdir $*
args=($*)
cd ${args[@]:(-1)}
}
and then
source ~/.bashrc
mcd -p a/b/c/d