From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Mon, 23 Nov 2009 23:24:12 +0100 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=000e0cd2e2bafa563d0479114867 Subject: [9fans] environment variables Topicbox-Message-UUID: 9eebb1ea-ead5-11e9-9d60-3106f5b1d025 --000e0cd2e2bafa563d0479114867 Content-Type: text/plain; charset=ISO-8859-1 Hello, If I have an rc script and I don't specify any rfork in it, then the namespace and the environment should be shared. So, having an 'a' script #!/bin/rc a = hello cd c #later on... and a 'b' script: #!/bin/rc a echo $a and running the 'b' script, I'd expect that the 'a' variable would be set to 'hello' and written out. But it does not work like that, thanks to some caching or what. How should the 'b' script, or whatever, be corrected so that it work? Further, I am now a bit puzzled about whose property the 'current directory' is. Why isn't the directory changed to 'c' after runing either the 'a' or 'b' script? Is this always a local property of each shell? Thank you a lot Ruda --000e0cd2e2bafa563d0479114867 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

If I have an rc script and I don't specify any rfork in i= t, then the namespace and the environment should be shared.
So, having a= n 'a' script

#!/bin/rc
a =3D hello
cd c =A0 #later on.= ..

and a 'b' script:

#!/bin/rc
a
echo $a

and r= unning the 'b' script, I'd expect that the 'a' variable= would be set to 'hello' and written out. But it does not work like= that, thanks to some caching or what. How should the 'b' script, o= r whatever, be corrected so that it work?

Further, I am now a bit puzzled about whose property the 'current d= irectory' is. Why isn't the directory changed to 'c' after = runing either the 'a' or 'b' script? Is this always a local= property of each shell?

Thank you a lot
Ruda
--000e0cd2e2bafa563d0479114867--