On Fri, Aug 03, 2001 at 01:10:12AM +0000, Sam Varshavchik wrote:
Bill Michell writes:
Sam Varshavchik writes:
Can everyone verify that their bourne, bash, or korn shell uses
"set -a" to automatically export all variables to the environment?
"-a Automatically mark variables which are modified or created for
export to the environment of subsequent commands"
Is that what you mean? This wording from the man page doesn't make
it clear whether the variables are actually exported, or are just
marked for export...
As I understand it the exporting doesn't actually happen until a program
is run, by constructing an environment array which is given to execve();
up until then the variables are marked for export. Bash's help for export
backs this up:
export: export [-nf] [name ...] or export -p
NAMEs are marked for automatic export to the environment of
subsequently executed commands. [...]
However: "-o allexport Same as -a." which seems to imply that the
effect is an automatic export.
Yes, that's what it means. I just want to make sure all
bourne/bash/korn mutations have this.
comp.unix.shell might be a good place to ask.