Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!usc!csun!csuna!abcscnge From: abcscnge@csuna.csun.edu (Scott "The Pseudo-Hacker" Neugroschl) Newsgroups: comp.unix.questions Subject: sh export does NOT affect parent (was Re: csh setenv problem) Message-ID: <2170@csuna.csun.edu> Date: 7 Sep 89 02:40:48 GMT References: <2312@zaphod.axion.bt.co.uk> Reply-To: abcscnge@csuna.csun.edu (Scott Neugroschl) Organization: CSU Northridge Lines: 22 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!!!