Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
environ(5)		      File Formats Manual		    environ(5)

NAME
       environ - user environment

DESCRIPTION
       An  array  of  strings  called  the 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 (listed in alphabeti-
       cal order):

       HOME	   Name	of the user's login directory, set  by	login(1)  from
		   the password	file (see passwd(4)).

       LANG	   Identifies the user's requirements for native language, lo-
		   cal customs and coded character  set,  if  the  environment
		   variables   LC_ALL,	 LC_COLLATE,   LC_CTYPE,  LC_MESSAGES,
		   LC_MONETARY,	LC_NUMERIC, and	LC_TIME	are unset or null.

		   The format of LANG is:

			LANG=language[_territory][.codeset]

		   The valid values for	 LANG  are  supported  locales.	  (See
		   lang(5).)   Native  Language	 Support (NLS) is initiated at
		   run-time by calling setlocale(3C).  The following  call  to
		   setlocale  binds  the  execution of a program to the	user's
		   language requirements:

			setlocale(LC_ALL,"");

		   This	setlocale call initializes the program locale from the
		   environment variables associated with setlocale.  LANG pro-
		   vides the necessary defaults	if any	of  the	 category-spe-
		   cific environment variables are not set or set to the empty
		   string.

		   The LANG environment	variable can have a maximum length  of
		   SL_NAME_SIZE	bytes (see header file <locale.h>).

       LANGOPTS	   Defines  language  options  for  mode and data order	in the
		   form:

			LANGOPTS=[mode][_order]

		   LANGOPTS values are given in	English	as an ASCII  character
		   string.   mode  describes  the mode of a file where l (ell)
		   represents Latin mode  and  n  represents  non-Latin	 mode.
		   Non-Latin  mode  is	assumed	for values other than l	and n.
		   order describes the data order of a file where  k  is  key-
		   board order and s is	screen order.

       LC_ALL	   Determines the values for all locale	categories.  The value
		   of LC_ALL has precedence over any of	the other  environment
		   variables  LC_COLLATE,  LC_CTYPE, LC_MESSAGES, LC_MONETARY,
		   LC_NUMERIC, LC_TIME,	and LANG .

       LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, and LC_TIME
		   determines the user's requirements for language, territory,
		   and	codeset	with respect to	character collation, character
		   classification and conversion,  output  messages,  currency
		   symbol  and	monetary  value	format,	numeric	data presenta-
		   tion, and time formats, respectively.  If LC_ALL and	any of
		   these are not defined in the	environment, LANG provides the
		   defaults.

		   Syntax for the environment variables	LC_COLLATE,  LC_CTYPE,
		   LC_MESSAGES,	LC_MONETARY, LC_NUMERIC, and LC_TIME is:

			language[_territory][.codeset][@modifier]

		   The	language field conforms	with ISO 639 standard for lan-
		   guage names and the territory field conforms	with  the  ISO
		   3166	 territory names.  For a list of the locale names, see
		   lang(5).

		   The @modifier field allows the user to select between  more
		   than	one value of a category	within the same	language defi-
		   nition.  HP-UX does not currently provide locales with mod-
		   ifiers.

		   The	values	of  the	 locale	categories are determined by a
		   precedence order; the first condition met below  determines
		   the value:

		   1. If the LC_ALL environment	variable is defined and	is not
		   null, the value of LC_ALL is	used.

		   2. If the LC_* environment variable (LC_COLLATE,  LC_CTYPE,
		   LC_MESSAGES,	 LC_MONETARY,  LC_NUMERIC, LC_TIME) is defined
		   and is not null, the	value of the environment  variable  is
		   used	to initialize the category that	corresponds to the en-
		   vironment variable.

		   3. If the LANG environment variable is defined and  is  not
		   null, the value of the LANG environment variable is used.

		   4. If the LANG environment variable is not set or is	set to
		   the empty string, the POSIX/C default locale	is used.  (See
		   lang(5).)

       LC_COLLATE  Determines the locale category for character	collation.  It
		   determines collation	information  for  regular  expressions
		   and	sorting, including equivalence classes and multi-char-
		   acter collating elements, in	 various  utilities  and  str-
		   coll(3C) and	strxfrm(3C) (see string(3C)).

       LC_CTYPE	   Determines the locale category for character	classification
		   (such as alphabetic,	digit, upper-case.)  See  isalpha(3C),
		   isdigit(3C),	  and  isupper(3C),  character	conversion  in
		   ctype(3C).  See toupper(3C),	tolower(3C), and the interpre-
		   tation  of  text as single-byte or multi-byte characters in
		   conv(3C).

       LC_MESSAGES Determines the locale category for  processing  affirmative
		   and	negative  responses and	the language and cultural con-
		   ventions  in	 which	diagnostic  and	 informative  messages
		   should  be  written.	  It  may  also	affect the behavior of
		   catopen(3C) in determining the message catalog to open.

       LC_MONETARY Determines the locale category for monetary-related numeric
		   formatting information.

       LC_NUMERIC  Determines  the  locale category for	numeric	formatting in-
		   formation (such as the thousands separator  and  the	 radix
		   character)  in  various  utilities as well as the formatted
		   I/O operations in printf(3S)	and scanf(3S) and  the	string
		   conversion functions	in strtod(3C).

       LC_TIME	   Determines the locale category for date and time formatting
		   information.	 It affects the	behavior of time functions  in
		   strftime(3C).

       MANPATH	   Contains a colon-separated list of directory	prefixes to be
		   searched by man(1) for manual entries.   Upon  logging  in,
		   (or sets If the file	exists,	the default settings are taken
		   from	this file.

		   MANPATH uses	the same syntax	as the PATH environment	 vari-
		   able,  with	the addition of	recognizing the	specifiers and
		   as used in the NLSPATH environment variable.	  See  NLSPATH
		   below for a description of these specifiers.	 This provides
		   a way to specify paths to locale-specific manual entries.

		   It is assumed that each of the prefixes  given  in  MANPATH
		   contain  subdirectories  of	the form and (See man(1), cat-
		   man(1M), and	fixman(1M).)

       NLSPATH	   Contains a sequence of pseudo-pathnames used	by catopen(3C)
		   when	 attempting  to	locate message catalogs.  Each pseudo-
		   pathname 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"

		   defines that	catopen(3C) should look	for all	message	 cata-
		   logs	 in  the  directory , where the	catalog	name should be
		   constructed from the	name parameter passed to catopen  (3C)
		   (%N)	with the suffix

		   Field descriptors consist of	a followed by a	single charac-
		   ter.	 Field descriptors and their substitution values are:

		      The value	of the
			      name parameter passed to catopen(3C).
		      The value	of
			      LC_MESSAGES.
		      The     language element from LC_MESSAGES.
		      The     territory	element	from LC_MESSAGES.
		      The     codeset element from LC_MESSAGES.
		      Replaced
			      by a single

		   For example,	given:

		   catopen(3C) attempts	to open	the file as a message catalog.

		   A null string is substituted	if the specified value is  not
		   defined.  Separators	are not	included in and	substitutions.
		   Note	that a default value is	not supplied  for  If  LC_MES-
		   SAGES  is not set and NLSPATH had the value in the previous
		   example, catopen(3C)	would attempt to open the  file	 as  a
		   message catalog.

		   Path	 names	defined	 in  NLSPATH are separated by colons A
		   leading colon or two	adjacent colons	is equivalent to spec-
		   ifying For example, given:

		   catopen(3C) with the	oflag parameter	set to will attempt to
		   open	the following files in the  indicated  order:  ./name,
		   ./name.cat,	and  /nlslib/$LC_MESSAGES/name.cat.  The first
		   file	successfully opened is taken as	the message catalog.

		   A default pseudo-pathname defined by	the system  is	effec-
		   tively appended to NLSPATH and used by catopen(3C) whenever
		   a message catalog cannot be opened in any of	the  user  de-
		   fined pseudo-pathnames.  This system-wide default path is:

		   If  catopen(3C) is invoked from a or	application with owner
		   root, the environment variable NLSPATH is  not  used.   In-
		   stead  the  system file is used to locate the message cata-
		   logs.  See nlspath(4) for details.

       PAGER	   PAGER indicates the paginator  through  which  output  from
		   certain  commands  is  piped.   Its	value must be a	string
		   specifying the complete command line	of the desired pagina-
		   tor.	 Two examples are:

		   PAGER  affects  several  commands, including	man(1) and the
		   interactive mailers.	 Some of the affected commands provide
		   alternate  means  of	 selecting  a pager in case there is a
		   conflict.  See the individual manual	entries	for details.

       PATH	   PATH	indicates the  sequence	 of  directory	prefixes  that
		   sh(1),  time(1),  nice(1), nohup(1),	and others search when
		   looking for a file known by an incomplete path name.	  Pre-
		   fixes  are  separated  by  colons The login(1) command sets
		   PATH=:/usr/bin.

       TERM	   TERM	identifies the kind of terminal	for which output is to
		   be  prepared.  This information is used by commands such as
		   vi(1) and mm(1), which can exploit special capabilities  of
		   that	terminal.

       TZ	   TZ  sets  time  zone	 information.  TZ can be set using the
		   format:

		      [:]STDoffset[DST[offset][,rule]]

		   where:

		      Three or more bytes that designate
				  the standard time zone and summer  (or  day-
				  light-savings) time zone is required.	 If is
				  not specified, summer	time does not apply in
				  this locale.	Any characters other than dig-
				  its, comma minus plus	or ASCII NUL  are  al-
				  lowed.

		      offset	  offset  is  the  value that must be added to
				  local	time to	arrive at Coordinated  Univer-
				  sal Time (UTC).  Offset is of	the form :

				       hh[:mm[:ss]]

				  Hour	(hh)  is  any value from 0 through 23.
				  The optional minutes (mm) and	 seconds  (ss)
				  fields  are  a value from 0 through 59.  The
				  hour field is	required.  If offset  is  pre-
				  ceded	 by  a	the  time  zone	is east	of the
				  Prime	Meridian.  A  preceding	 offset	 indi-
				  cates	 that  the  time  zone	is west	of the
				  Prime	Meridian.  The default case is west of
				  the Prime Meridian.

		      rule	  rule	indicates  when	 to change to and from
				  summer (daylight-savings)  time.   The  rule
				  has the form :

				       date/time,date/time

				  where	 the  first  specifies	when to	change
				  from standard	to summer time,	and the	second
				  specifies  when  to  change  back.  The time
				  field	is expressed in	current	local time.

				  The form of date should be one of  the  fol-
				  lowing :

				     Julian day
					     n (1 through 365).	 Leap days are
					     not counted.  February 29	cannot
					     be	referenced.

				     n	     The   zero-based  Julian  day  (0
					     through  365).   Leap  days   are
					     counted.  February	29 can be ref-
					     erenced.

				     Mm.n.d  The d day (0 through 6) of	week n
					     (1	 through  5)  of  month	 m  (1
					     through 12) of the	year.  Week  5
					     refers to the last	day d of month
					     m.	 Week 1	is the week  in	 which
					     the first day of the month	falls.
					     Day 0 is Sunday.

				     time    Time has the same format as  off-
					     set  except  that no leading sign
					     ("-" or "+") is allowed.  The de-
					     fault,  if	 time is not given, is
					     02:00:00.

				  While	the STD	field and the offset field for
				  STD  must  be	specified, if the DST field is
				  also provided, the system  will  supply  de-
				  fault	values for other fields	not specified.
				  These	default	values	come  from  file  (see
				  tztab(4)), and, in general, reflect the var-
				  ious historical dates	for start and  end  of
				  summer time.

       Additional 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
       add  names  that	conflict with the following shell variables frequently
       exported	by files: and

       The environment of a process is accessible from C by using  the	global
       variable:

       which  points  to an array of pointers to the strings that comprise the
       environment.  The array is terminated by	a null pointer.

WARNINGS
       Some HP-UX commands and library routines	do not use the	LANG,  LC_COL-
       LATE,  LC_CTYPE,	LC_MONETARY, LC_NUMERIC, LC_TIME, or LANGOPTS environ-
       ment variables.	Some commands do not use message catalogs, so  NLSPATH
       does not	affect their behavior.	See the	EXTERNAL INFLUENCES section of
       specific	commands and library routines for implementation details.

NOTES
       Coordinated Universal Time (UTC)	is equivalent to Greenwich  Mean  Time
       (GMT).

AUTHOR
       was developed by	AT&T and HP.

SEE ALSO
       env(1),	login(1),  sh(1), exec(2), catopen(3C),	ctime(3C), getenv(3C),
       setlocale(3C), nlspath(4), profile(4), lang(5), term(5),	tztab(4).

STANDARDS CONFORMANCE
								    environ(5)

NAME | DESCRIPTION | WARNINGS | NOTES | AUTHOR | SEE ALSO | STANDARDS CONFORMANCE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=environ&sektion=5&manpath=HP-UX+11.22>

home | help