Setting environment variables, Default environment variables – HP NonStop G-Series User Manual

Page 46

Advertising
background image

Table 9 Default Environment Variables

Default Value (Applies Only to the /etc/profile File)

Variable

Unspecified

COLUMNS

Unspecified

EDITOR

Unspecified

ENV

/bin/ed

FCEDIT

Unspecified

FPATH

Unspecified

HISTFILE

Unspecified

HISTSIZE

Home directory of user (this value cannot be changed by the user)

HOME

Single space character

IFS

Unspecified

LINES

/bin:/bin/unsupported

PATH

$pwd:

PS1

>

PS2

#?

PS3

+

PS4

/bin/sh

SHELL

xterm

TERM

0

TMOUT

Unspecified

UTILSGE

Unspecified

VISUAL

If you choose, you can use the default environment established in /etc/profile by the system
administrator. However, you may decide to create or modify .profile, adding aliases, customized
paths, and other variables.

Verify whether you already have a .profile file in your home directory by using the ls -a
command. This command displays all files that begin with a . (dot), along with all other entries.
If .profile does not exist, create it using the vi text editor (see

Chapter 7 (page 90)

).

Check the contents of /etc/profile so that you can avoid duplicate definitions in your .profile
file.

Setting Environment Variables

In general, you set environment variables with an assignment statement, whose general format is
the following:

name=value

The name entry specifies the variable name. The value entry specifies the value assigned to the
variable. Be sure you do not type spaces on the command line.

You can set environment variables in either of two ways:

By setting the values on the command line, if you want these values only for the current shell
session

By editing the .profile file, if you want these values whenever you run osh

46

The OSS Shell

Advertising
This manual is related to the following products: