stefanwagner
Programmer
I made a microscript for bash, to be included in .bash_profile, to jump up multiple directories at once.
to jump 4 steps up in the directory hierarchie.
It's short and simple:
I concatenate a string, to allow to jump back with
Now I'm interested to hear, whether it will work in zsh, ksh, ash, csh, sh, dash and the like.
don't visit my homepage:
Code:
# instead of
cd ../../../..
# you could use
up 4
It's short and simple:
Code:
# (c) 2007 stefan w. GPLv3
function up {
ups=""
for i in $(seq 1 $1)
do
ups=$ups"../"
done
cd $ups
}
Code:
cd -
Now I'm interested to hear, whether it will work in zsh, ksh, ash, csh, sh, dash and the like.
don't visit my homepage: