It is currently Mon, 04 Mar 2024 00:58:30 GMT



 
Author Message
 Global definitions in ${ENV} scripts
Hay ev'rybody,

First of all, I'm using ksh.
For defining global functions and aliases, a top-level script sets the
ENV variable. Then this script calls other scripts and the ${ENV} script
is also executed.

For some reason, my functions and aliases, which were supposed to be
global, do not exist in the called scripts. I noticed that;
  (a) the ${ENV} script runs in the context of the called script
      (which is good)
  (b) if I explicitely invoke the ${ENV} script, using the . ${ENV}
      command the functions and aliases DO EXIST in the called script
      (the desired effect of the ${ENV} script setting)

I'm obviously missing something. Could somebody shed a light on this one,
'cause I haven't got a clue.
Thanks very much in advance,
Real

--

[ Please, also sent your reply directly by email, otherwise I might ]
[ miss your reply. Thanks.                                          ]



 Mon, 05 Aug 2002 03:00:00 GMT   
 Global definitions in ${ENV} scripts
In article <MPG.1315f5d388b54718989...@news.surfnet.nl>,

First,  you must be using ksh88 - ksh93/8 only source the ENV file
for interactive shells.

Second,  ENV must be exported.

Third,  the script must begin with "#!/path/to/ksh"

--
Dan Mercer
damer...@uswest.net

Opinions expressed herein are my own and may not represent those of my employer.



 Mon, 05 Aug 2002 03:00:00 GMT   
 Global definitions in ${ENV} scripts
In article <MPG.1315f5d388b54718989...@news.surfnet.nl>,

First,  you must be using ksh88 - ksh93/8 only source the ENV file
for interactive shells.

Second,  ENV must be exported.

Third,  the script must begin with "#!/path/to/ksh"

--
Dan Mercer
damer...@uswest.net

Opinions expressed herein are my own and may not represent those of my employer.



 Mon, 05 Aug 2002 03:00:00 GMT   
 Global definitions in ${ENV} scripts
In article <MPG.1315f5d388b54718989...@news.surfnet.nl>,

First,  you must be using ksh88 - ksh93/8 only source the ENV file
for interactive shells.

Second,  ENV must be exported.

Third,  the script must begin with "#!/path/to/ksh"

--
Dan Mercer
damer...@uswest.net

Opinions expressed herein are my own and may not represent those of my employer.



 Mon, 05 Aug 2002 03:00:00 GMT   
 Global definitions in ${ENV} scripts
In article <MPG.1315f5d388b54718989...@news.surfnet.nl>,

First,  you must be using ksh88 - ksh93/8 only source the ENV file
for interactive shells.

Second,  ENV must be exported.

Third,  the script must begin with "#!/path/to/ksh"

--
Dan Mercer
damer...@uswest.net

Opinions expressed herein are my own and may not represent those of my employer.



 Mon, 05 Aug 2002 03:00:00 GMT   
 
   [ 5 post ] 

Similar Threads

1. debian, m68k: HELP PROBLEM: global register variable follows a function definition

2. Env. Variable definition problem

3. global env. variables for tcsh

4. Best way to set env variables for multiple users or global

5. How to set global env in .exrc ?

6. working with global (env) variables

7. definition of shell type for script

8. Setting global ENV var for all users in /etc/init.d/*-scripts ?

9. C program interface w/Bourne shell script: how to have global env. vars?


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software