Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.unix.wizards Subject: Re: Environment variables Keywords: putenv Message-ID: <1158@virtech.UUCP> Date: 15 Sep 89 04:22:48 GMT References: <57732@aerospace.AERO.ORG> Organization: Virtual Technologies Inc Lines: 29 In article <57732@aerospace.AERO.ORG>, louis@aerospace.aero.org (Louis M. McDonald) writes: > Basically, I would like to have something that does not require me to > have a user `source' a file to get the environment variables I want defined > for his/her session. If you are using the [c|k|ba]sh, you can create an alias which sources the shell that sets the environment vars you want. The standard shell and Ksh ( not sure about bash) also allows the use of shell functions which will have the effect you want. For ex: Under the ksh: alias use_this_environ=". $HOME/envvars" or use_this_environ() { new_var=.... } BTW, even within the same program putenv() will not correctly work unless you use non-automatic data for the environment strings that you are adding. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+