[Ilugc] EXPORT command in shell script not working

  • From: Harris.Rahman@xxxxxxxxxxxxxxx (Harris Rahman)
  • Date: Fri Aug 6 10:29:41 2004


Hi all,
      I seem to have a little problem with shell scripting. I need all your
valuable help.

      Following is a part of a shell script i wrote

                  IGSPATH=/opt/JP1Cm2IGS
                  LD_LIBRARY_PATH=/opt/JP1Cm2IGS/bin
                  export LD_LIBRARY_PATH

      I need the environment variable LD_LIBRARY_PATH to be set after
execution of this script .I can put this under /etc/bashrc or under the
.bash_profile file ,so that it is set in all terminals . But my requirement
is that the environment variable should be set only after the execution of
the shell script.

      After i execute the shell sript as

            [root@localhost /]   ./shell_script

      I also kow , i can set the variable in the shell where i run this
shell script by executing it as (. ./ by putting a "." in front of the "./"
to ask the shell to execute the script in the current shell rather than
spawning a new shell. But this seems to close my parent shell, so this
opting too iam discounting) i checked the value of this environment
variable using

            [root@localhost /] echo $LD_LIBRARY_PATH

      It shows nothing, i mean the variable is not being set.I understand
the function of EXPORT command is to make sure the variable that is being
set, to be reflected in all the terminals after the execution of this
EXPORT command.

      Is this a bug with the EXPORT command or am i not understanding the
function of this command . I request you all to please help me solve this.

Thanks a ton in advance

Warm Regards
N.Harris ur rahman



This email may contain confidential or privileged information for
theintended recipient(s).  If you are not the intended recipient, please do
not use or disseminate the information, notify the sender and delete it
from your system.  Thanks




______________________________________________________________________

Other related posts: