[comp.unix.questions] sh export does NOT affect parent

abcscnge@csuna.csun.edu (Scott "The Pseudo-Hacker" Neugroschl) (09/07/89)

In article <2312@zaphod.axion.bt.co.uk> iwarner@zaphod.axion.bt.co.uk writes:
>	The Bourne Shell (sh) has an export command, which exports
>a variable to the parent shell. Csh does not have this.

Wrong.  The sh (and ksh) export command performs the same function as setenv
in the C shell.  The Bourne and Korn shells make no distinction between shell
variables and environment variables.  The only difference is the environment
variables have been "export"ed.  This means they go to child processes, NOT
to the parent process.  As far as I know, short of actually tweaking /dev/mem
(and maybe even not then...) there is no way for a child process to affect its
parent's environment.


Random thoughts from:

	The Pseudo-Hacker


-- 
Scott "The Pseudo-Hacker" Neugroschl		abcscnge@csuna.csun.edu
-- Beat me, Whip me, make me code in Ada
-- Disclaimers?  We don't need no stinking disclaimers!!!