Modifying an environment-variable setting
About this task
Sometimes you must add information to an environment variable that is already set. For example, the PATH environment variable is always set on UNIX™. When you use HCL OneDB™ productd, you must add to the PATH setting the name of the directory where the executable files for the HCL OneDB products are stored.
In the following example, the ONEDB_HOME is /usr/informix.
(That is, during installation, the HCL OneDB products
were installed in the /usr /informix directory.) The executable
files are in the bin subdirectory, /usr/informix/bin.
To add this directory to the front of the C shell PATH environment
variable, use the following command:
setenv PATH /usr/informix/bin:$PATH
Rather
than entering an explicit pathname, you can use the value of the ONEDB_HOME environment
variable (represented as $ONEDB_HOME), as the following example
shows:
setenv ONEDB_HOME /usr/informix
setenv PATH $ONEDB_HOME/bin:$PATH
You might prefer
to use this version to ensure that your PATH entry does not
conflict with the search path that was set in ONEDB_HOME,
and so that you are not required to reset PATH whenever you
change ONEDB_HOME. If you set the PATH environment
variable on the C shell command line, you might be required to include
braces (
{}
) with the existing ONEDB_HOME and PATH,
as the following command shows: setenv PATH ${ONEDB_HOME}/bin:${PATH}
For more information about how to set and modify environment variables, see the publications for your operating system.