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 Informix® productd, you must add to the PATH setting the name of the directory where the executable files for the HCL Informix® products are stored.
In the following example, the INFORMIXDIR is /usr/informix.
(That is, during installation, the HCL Informix® 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 INFORMIXDIR environment
variable (represented as $INFORMIXDIR), as the following example
shows:
setenv INFORMIXDIR /usr/informix
setenv PATH $INFORMIXDIR/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 INFORMIXDIR,
and so that you are not required to reset PATH whenever you
change INFORMIXDIR. If you set the PATH environment
variable on the C shell command line, you might be required to include
braces (
{}
) with the existing INFORMIXDIR and PATH,
as the following command shows: setenv PATH ${INFORMIXDIR}/bin:${PATH}
For more information about how to set and modify environment variables, see the publications for your operating system.