ENVIRON(5) — HP-UX
NAME
environ − user environment
DESCRIPTION
An array of strings called the "environment" is made available by exec(2) when a process begins. By convention, these strings have the form "name=value". The following names are used by various commands:
PATH PATH indicates the sequence of directory prefixes that sh(1), time(1), nice(1), nohup(1), etc., search when looking for a file known by an incomplete path name. Prefixes are separated by colons (:). Login(1) sets PATH=:/bin:/usr/bin.
HOME HOME is the name of the user’s login directory, set by login(1) from the password file (see passwd(4)).
TERM TERM identifies the kind of terminal for which output is to be prepared. This information is used by commands, such as mm(1) or tplot(1), that can exploit special capabilities of that terminal.
TZ TZ sets time zone information. The minimum format is tznamediff, where tzname is an "alphabetic" string giving the time-zone name or abbreviation, and diff is the difference in hours from GMT. Diff may be positive (west of Greenwich) or negative (east of Greenwich). Fractional hours are indicated as minutes preceded by a colon. If a summer time-zone adjustment (such as for Daylight Savings Time in the USA) is to be applied, the format is tznamediffdstzname, where dstzname is the name of the "Daylight Savings" time zone. The entire string is compared to entries in the tztab file for time zone adjustment information (see tztab(4)).
LANG LANG identifies the user’s requirements for native language, local customs and coded character set, in the form:
LANG=language[_territory[.codeset]]
Values of LANG are given in English as an ASCII character string and should be one of the NLS environment names, as defined in langid(5). At runtime, the user’s language requirements, as specified by LANG, are bound to the execution of a program by calling nl_init (see nl_init(3C)). For example:
nl_init( getenv("LANG") );
NLSPATH NLSPATH contains a sequence of pseudo-path names that catopen(3C) uses when attempting to locate message catalogues. Each pseudo-path name contains a name template consisting of an optional path prefix, one or more substitution field descriptors, a file name and an optional file name suffix. For example:
NLSPATH="/system/nlslib/%N.cat"
instructs catopen(3C) to look for all message catalogues in the directory /system/nlslib, where the catalogue name is constructed from the name parameter passed to catopen (%N) and the suffix ".cat".
Field descriptors consist of a % preceding a single character. NLSPATH recognizes the following field descriptors and substitution values:
%N The value of the "name" parameter passed to catopen(3C).
%L The value of LANG.
%l The language element from LANG.
%t The territory element from LANG.
%c The codeset element from LANG.
%% Replaced by a single %.
A null string is substituted if the specified value is not defined. Separators are not included in %t and %c substitutions.
Path names defined in NLSPATH are separated by colons (:). A leading colon or two adjacent colons (::) indicates the current directory. For example:
NLSPATH=":%N.cat:/nlslib/%L/%N.cat"
tells catopen(3C) to look for the requested message catalogue in "name", "name.cat" and "/nlslib/$LANG/name.cat".
A default psuedo-path name defined by the system is effectively appended to NLSPATH and used by catopen(3C) whenever a message catalogue cannot be opened in any of the user defined psuedo-path names. This systemwide default path is:
/usr/lib/nls/%L/%N.cat
Further names may be placed in the environment by the export command and "name=value" arguments in sh(1), or by exec(2). It is unwise to conflict with the following shell variables frequently exported by .profile files: MAIL, PS1, PS2 and IFS.
The environment of a process is accessible from C by using the global variable:
char ∗∗environ;
which points to an array of pointers to the strings that comprise the environment. The array is terminated by a null pointer.
HARDWARE DEPENDENCIES
Series 200, 300, 500
The environment string NLSPATH is currently not supported.
AUTHOR
Environ was developed by AT&T and HP.
SEE ALSO
env(1), login(1), sh(1), exec(2), catopen(3C), ctime(3C), getenv(3C), nl_init(3C), profile(4), langid(5), term(5), tztab(4).
Hewlett-Packard Company — Version B.1, May 11, 2021