ksh script execution (Re: make importing SHELL)

Doug Gwyn gwyn at smoke.ARPA
Mon Oct 3 18:13:57 AEST 1988


In article <10678 at ulysses.homer.nj.att.com> ggs at ulysses.homer.nj.att.com (Griff Smith) writes:
>If I remember correctly, V9 does export functions.

Yes, at least so the manual says.

>Since I haven't used it, I don't know how the design avoids confused
>execution in naive scripts.

Me either (it's not just scripts that would be affected).
Note also that older Bourne shells will barf and die if one's
environment contains any such critter as an exported function.
Therefore when we were adopting V8/V9, csh/tcsh, and ksh features for
the BRL Bourne shell, we took a different approach.  Our shell sources
a file named by the ENV environment variable, only when starting an
interactive shell.  Non-interactive uses of the shell such as scripts
can do their own sourcing of files containing function definitions etc.,
thank you very much.  This is more general and less troublesome than
either the V8/V9 or ksh solutions to the same problem.  The efficiency
difference is negligible.



More information about the Comp.unix.wizards mailing list