in reply to Modifying ENV variable of parent process
{ my @lines = `/bin/ksh -c ". oraenv -d; set"`; for (@lines) { next unless /=/; my($k,$v) = split /=/, $_, 2; $ENV{$k} = $v; } }
That should call /bin/ksh so it runs the script and then it has /bin/ksh run set, which dumps all the variables of the shell, and the results of the set should then be parsed and inserted into %ENV
I forewarn that that code is untested.
|
|---|