Home | Previous Page | Next Page   Environment Variables > Using Environment Variables on UNIX >

Modifying an Environment-Variable Setting

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 an IBM Informix product, you must add to the PATH setting the name of the directory where the executable files for the IBM Informix products are stored.

In the following example, the INFORMIXDIR is /usr/informix. (That is, during installation, the IBM 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 do not have to reset PATH whenever you change INFORMIXDIR. If you set the PATH environment variable on the C shell command line, you might need 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, refer to the manuals for your operating system.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]