Subject: More Bourne shell script help
To: None <netbsd-help@netbsd.org>
From: Andy Ruhl <acruhl@gmail.com>
List: netbsd-help
Date: 07/26/2006 09:38:15
Thanks for everyone's input on my last question.

I have the entire script written, except for the very last part.

It parses input so that it may cd to some fairly long directory path.

What I'm stuck on is, how to cd to that path and make it "stick" when
the script exits?

What I've done is strip down everything so that, say, $dirpath is the
string that I need to pass to cd.

This works inside the script:

cd $dirpath

However when the script exits I'm just back to the same pwd as I was before.

I think I'm going to have to execute a new shell and pass in "cd
$dirpath" as a command? It would be really nice not to have to do
this... Any way not to? And if not, any suggestions on how I should
get that done?

Thanks a bunch!

Andy