On Mon, 21 May 2001, Jacob Meuser wrote: > A simple test ... well, not really, but it can give some idea of how export > works. > > $ export THIS=test1 && echo 'export MY_VAR=test2\necho ${MY_VAR}' > ${THIS} \ > && sh ${THIS} && echo ${MY_VAR} && echo ${THIS} > ok i just tried this test and i get bash: test1: command not found $ cat test1 export MY_VAR=test2\necho ${MY_VAR} ^^ oops. are you using a different shell with different quoting rules? obviously not csh cos' i just tried it and it didn't recognize export. > Basically, xdm and getty lose the variable. They are what start the user > sessions, if I'm not mistaken. as i understand it. /etc/environment is executed at boot /etc/profile is executed for every login shell if you open a subsidiary shell of any kind it starts off with the environment of the login session that spawned it, no? i'm trying to solve a problem of a necessary variable not getting set at startup for some reason. mostly i just want to understand the why's and wherefore's ;-)