[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bash: can I cd from a script



I have a script to show a certain directory, it would be great if that script could change my pwd to that directory.

Inside my script is a cd /usr/lo....., however since the script automaticly runs in a subshell, when it ends my directory has not changes.

I have tries
export PWD=/usr/lo....

no go...

source <scriptname> works but is clumbs

Is there a way to get round this ?
Dave




Reply to: