Subject: sh does not export variables
To: None <netbsd-users@netbsd.org>
From: None <sigsegv@rambler.ru>
List: netbsd-users
Date: 07/17/2004 22:33:53
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?

roman$ cat ./test
#!/bin/sh

export TEST1=one
export TEST2=two
export TEST3=three

echo $TEST1 $TEST2 $TEST3


roman$ ./test
one two three


roman$ echo $TEST1 $TEST2 $TEST3

roman$