Re: Enviroment Variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ryan Ollerenshaw writes:

 > I can write a shell script that will set an enviroment variable
 > using the export command, but then when i try and print the
 > variable after the shell scrit has been run the variable is no
 > longer set.  Why is this?  my problem is that i need to set some
 > enviroment variables in a shell script that is run when my tomcat
 > server is started, but after the startup script runs the variables
 > are no longer set.  Here is what i am using in my scripts:
 > 
 > export CLASSPATH=/usr/root/
 > echo $CLASSPATH
 > 
 > but then when i do a echo $CLASSPATH from the command line the
 > original value is printed and not the one set in the shell script.
 > 
 > any help would be great.

Use the "." command.  So, instead of running foo, run 

  . foo

Andrew.

--
fedora-devel-java-list mailing list
fedora-devel-java-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-java-list

[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux