Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!gatech!uflorida!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: ksh script execution (Re: make importing SHELL) Message-ID: <8619@smoke.ARPA> Date: 3 Oct 88 08:13:57 GMT References: <452@alice.marlow.uucp> <67870@sun.uucp> <67925@sun.uucp> <4273@dunkshot.mips.COM> <10678@ulysses.homer.nj.att.com> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 19 In article <10678@ulysses.homer.nj.att.com> ggs@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.