Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ environ(M) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(C)

env(C)

exec(S)

getenv(S)

login(M)

profile(M)

sh(C)

tz(M)



     ENVIRON(M)               XENIX System V                ENVIRON(M)



     Name
          environ - The user environment.

     Description
          The user environment is a collection of information about a
          user, such as his login directory, mailbox, and terminal
          type. The environment is stored in special ``environment
          variables,'' which can be assigned character values, such as
          names of files, directories, and terminals.  These variables
          are automatically made available to programs and commands
          invoked by the user.  The commands can then use the values
          to access the user's files and terminal.

          The following is a short list of commonly used environment
          variables.

          PATH        Defines the search path for the directories
                      containing commands.  The system searches these
                      directories whenever a user types a command
                      without giving a full pathname.  The search path
                      is one or more directory names separated by
                      colons (:).  Initially, PATH is set to
                      :/bin:/usr/bin.

          HOME        Names the user's login directory.  Initially,
                      HOME is set to the login directory given in the
                      user's passwd file entry.

          TERM        Defines the type of terminal being used. This
                      information is used by commands such as more(C)
                      which rely on information about the capabilities
                      of the user's terminal.  The variable may be set
                      to any valid terminal name (see terminals(M))
                      directly or by using the tset(C) command.

          TZ          Defines time zone information. This information
                      is used by date(C) to display the appropriate
                      time.  The variable may have any value of the
                      form:

                      xxxnzzzs; start/time, end/time

                      where xxx is standard local time zone
                      abbreviation (1-9 characters), n is the standard
                      time zone difference from GMT, and may be given
                      as hh:mm:ss (hours:minutes:seconds), zzz is the
                      summertime local time zone abbreviation of 1-9
                      characters (if any), s is the summertime time
                      zone difference from GMT, and may be given as
                      hh:mm:ss (hours:minutes:seconds), start and end
                      specify the day to begin and end summertime
                      based on one of four rules, and time is the time



     Page 1                                           (printed 8/7/87)





     ENVIRON(M)               XENIX System V                ENVIRON(M)



                      of day the change to or from summertime occurs.
                      The rules for specifying start and end are:

                           Jn        1 based Julian day n
                           n         0 based Julian day n
                           Wn.d      nth day of week d
                           Mm.n.d         nth day of week d in month m

                      For example:

                      EST5:00:00EDT4:00:00;M4.1.0/2:00:00,M10.5.0/2:00:00.
                      Refer to the tz(M) manual page for more on TZ.

          HZ          Defines, with a numerical value, the number of
                      clock interrupts per second.  The value of this
                      variable is dependent on the hardware, and
                      configured in the file etc/default/login.  If HZ
                      is not defined, programs which depend on this
                      hertz value, such as prof(CP) and times(S), will
                      not run.

          LANG        Defines the language locale a user wishes to
                      use. This variable can be queried by
                      applications and utilities to determine how to
                      display information, what language to use for
                      messages, sorting order, and other language
                      dependent functions.

          The environment can be changed by assigning a new value to a
          variable.  For Bourne shell, sh(C), an assignment has the
          following format:

               name=value

          For example, the assignment:

               TERM=h29

          sets the TERM variable to the value ``h29''.  The new value
          can be ``exported'' to each subsequent invocation of a shell
          by exporting the variable with the export command (see
          sh(C)) or by using the env(C) command.

          C-shell users make assignments using the setenv command.
          For example:

               setenv TERM h29

          For more information, see csh(C).

          A user may also add variables to the environment, but must
          be sure that the new names do not conflict with exported



     Page 2                                           (printed 8/7/87)





     ENVIRON(M)               XENIX System V                ENVIRON(M)



          shell variables such as MAIL, PS1, PS2, and IFS.  Placing
          assignments in the .profile file is a useful way to change
          the environment automatically before a session begins.  C-
          shell users can place assignments in their .cshrc or .login
          files.

          Note that the environment is made available to all programs
          as a string of arrays.  Each string has the format:

               name=value

          where the name is the name of an exported variable and the
          value is the variable's current value.  For programs started
          with a exec(S) call, the environment is available through
          the external pointer environ.  For other programs,
          individual variables in environment are available through
          getenv(S) calls.

     See Also
          csh(C), env(C), exec(S), getenv(S), login(M), profile(M),
          sh(C), tz(M)


































     Page 3                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026