That treats this problem and many more which you might encounter some
day.
Good luck
Alois
> > I am using AIX 4.3.3 and the korn shell. I have a script that provides a
> > menu to our operators. When a selection is made, a set of environment
> > variables are set, by calling another script. For example, selection "2"
I
> > use the case function to come to the action . /home/user/setenv1 This
works
> > fine in the script, but when I exit, the environment reverts back to the
> > original state, (what it was before the menu was run). If I put that
same
> > command in a one line script, that is, testt.sh contains .
> > /home/user/setenv1 This sets the environment and it stays set even when
the
> > script is done. I'd appreciate any advice.
> Hello,
> well, the best advice is: Please look into the FAQ for
> comp.unix.questions.
> That treats this problem and many more which you might encounter some
> day.
> Good luck
> Alois
http://www.faqs.org/Quote:> Forgive my ignorance, but where do I find the FAQ?
To your problem
parse the file with ". MyPath/MyScript" - "dot space ..."
Hm , after rereading your message i would say:
It works as designed.
Hajo
Send the script. I'll make it work.
Mohit Anchlia
regards,
Ross
--
Glendower: I can call spirits from the vasty deep.
Hotspur: Why, so can I, or so can any man;
But will they come when you do call for them?
| I am using AIX 4.3.3 and the korn shell. I have a script that provides a
| menu to our operators. When a selection is made, a set of environment
| variables are set, by calling another script. For example, selection "2" I
| use the case function to come to the action . /home/user/setenv1 This works
| fine in the script, but when I exit, the environment reverts back to the
| original state, (what it was before the menu was run). If I put that same
| command in a one line script, that is, testt.sh contains .
| /home/user/setenv1 This sets the environment and it stays set even when the
| script is done. I'd appreciate any advice.
If you are running a script and intend to have it change variables in
the current environment, you must 'source' it (that is,
do not
bozo
but
. /path/bozo
where the dot is 'sourcing' the file bozo.
Else, bozo runs in a subshell so things it sets are never seen at the
higher level.
norm
1. Setting environment variables (netscape enterprise server/aix)
Hi,
Can anyone tell me how I can set environment variables for the web
server. We're running Netscape Enterprise server on aix4.3/rs6k.
I've tried setting the value in /etc/environment, but it does not seem to
take it's environment from there.
Any ideas?
Thanks,
Mark Irvine
3. setting environment before calling execv()
5. Dynamically setting environment variables on apache startup?
6. lilo boot problems - 2 disks - 2 O/S's
7. Setting environment variables from a C program??
8. eth0 transmit timed out with Apple CS II Ethernet on SuSE 2.4.12
9. Setting environment variables like pwd
10. How to set environment variables?
11. Setting Environment Variables
12. set environment variable in csh
13. setting environment variables