Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: command line options Message-ID: <7746@brl-smoke.ARPA> Date: 24 Apr 88 16:16:40 GMT References: <2414@zyx.UUCP> <8039@elsie.UUCP> <7628@brl-smoke.ARPA> <143@gsg.UUCP> <7634@brl-smoke.ARPA> <1864@sugar.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <1864@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes: >Speaking of the bourne-again shell (System V shell), how do you get a shell >function inherited by subshells? In the 8th Edition UNIX shell, you simply export them via the environment. In the BRL SVR2 Bourne shell, you define the functions in the per- interactive-shell startup file named in the ENV environment variable (the usual usage around here is to define ENV as ~/.env and have ~/.env source a ~/.funcs file that contains the definitions). Note that this scheme prevents having functions screw up shell scripts (which are not run as "interactive"). In a vanilla UNIX System V Bourne shell, you cannot obtain the desired effect so far as I am aware.