Subject: Re: sh does not export variables
To: None <netbsd-users@netbsd.org>
From: None <sigsegv@rambler.ru>
List: netbsd-users
Date: 07/18/2004 00:14:29
Thor Lancelot Simon wrote:

>On Sat, Jul 17, 2004 at 10:33:53PM +0100, sigsegv@rambler.ru wrote:
>  
>
>>I've been working with various shell scripts and found out that /bin/sh 
>>does not export variables. I'm running NetBSD-2.0F. Below is a simple 
>>shell script, which sets 3 variables and then prints out their values, 
>>after the script exits, the variables are not exported. Does anyone know 
>>what's going on here?
>>    
>>
>
>Child processes can't change their parent process' environment.  This
>won't work with any shell, on any Unix system.
>
>If you want to run a shell script in the environment of your current
>shell, you need to run it with "." or "source" depending on which shell
>you're using.
>
>Thor
>
>  
>
Right, I knew it was something silly like that, I better remember it 
next time :-)