sh export does NOT affect parent (was Re: csh setenv problem)
Scott "The Pseudo-Hacker" Neugroschl
abcscnge at csuna.csun.edu
Thu Sep 7 12:40:48 AEST 1989
In article <2312 at zaphod.axion.bt.co.uk> iwarner at 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 at csuna.csun.edu
-- Beat me, Whip me, make me code in Ada
-- Disclaimers? We don't need no stinking disclaimers!!!
More information about the Comp.unix.questions
mailing list