Subject: Re: More Bourne shell script help
To: Johnny Billquist <bqt@update.uu.se>
From: Andy Ruhl <acruhl@gmail.com>
List: netbsd-help
Date: 07/26/2006 12:32:52
On 7/26/06, Johnny Billquist <bqt@update.uu.se> wrote:
> The current path, as well as all environment variables are only
> inherited by cild processes. You can never affect the parent process.

Yeah, I should have stated that I understand this, I was just trying
to write it with as much clarity as possible and as the newbie I am.

Currently I know of only 2 ways to accomplish this:

1. Set these as functions in the shell, then run them.
2. Fork a new shell and have it run the cd command to the new
directory, although I haven't had luck with that yet (probably haven't
read the man pages well enough so far).

On the advice of another kind individual, I've already implemented the
entire thing into the shell as a function with the . <functions>
method. It works fine.

Would be nice to have it work as a standalone script though, even if
it must fork a new shell.

Andy