The environment of the parent
stuart at bms-at.UUCP
stuart at bms-at.UUCP
Sat Nov 22 06:08:42 AEST 1986
In article <261 at mipos3.UUCP>, pinkas at mipos3.UUCP (Israel Pinkas) writes:
> he would like to place the typed-in values in the parents environment
> Any pointers as to how to get at, and set, the parent's environment would
> be helpful.
In *nix, you have to *be* the parent. Other methods involve cooperation
with the parent.
You could make your command a shell alias which would
'eval' the output of your program:
chkenv() { # SysV sh
eval `chkenv.prog`
}
'chkenv.prog' should output something like:
VAR1=abc; VAR2=def; export VAR1 VAR2
'csh' users need their own special syntax.
--
Stuart D. Gathman <..!seismo!{vrdxhq|dgis}!bms-at!stuart>
More information about the Comp.unix.questions
mailing list