Sds9985
365 pts. | Oct 26 2009 5:37PM GMT
You need to “source” the script, so that it’s effective on the parent shell.
Instead of:
myscript
or
sh myscript
use
. myscript
Petkoa
1005 pts. | Oct 27 2009 11:14AM GMT
Or define a function in your profile ( ~/.bash_profile in bash ):
function cdc () {
cd /abc/def/ghi/lmn/$1/opq/rst/uvw
}
Good luck,
Petko A.
How to cd into a directory and stay there | Linux Affinity
0 pts. | Oct 31 2009 2:23PM GMT
[...] post: How to cd into a directory and stay there Posted in: How To’s ADD [...]






