Print this page
Garrett's man page edits.
   1 '\" te
   2 .\" Copyright 1989 AT&T
   3 .\" Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
   4 .\" Copyright (c) 2014, Joyent, Inc.  All Rights Reserved

   5 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   7 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   8 .TH ENVIRON 5 "Nov 19, 2002"
   9 .SH NAME
  10 environ \- user environment
  11 .SH DESCRIPTION
  12 .sp
  13 .LP
  14 When a process begins execution, one of the \fBexec\fR family of functions
  15 makes available an array of strings called the environment; see \fBexec\fR(2).
  16 By convention, these strings have the form \fIvariable=value\fR, for example,
  17 \fBPATH=/sbin:/usr/sbin\fR. These environmental variables provide a way to make
  18 information about a program's environment available to programs.
  19 .sp
  20 .LP
  21 A name may be placed in the environment by the \fBexport\fR command and
  22 \fIname\fR=\fIvalue\fR arguments in \fBsh\fR(1), or by one of the \fBexec\fR
  23 functions. It is unwise to conflict with certain shell variables such as
  24 \fBMAIL\fR, \fBPS1\fR, \fBPS2\fR, and \fBIFS\fR that are frequently exported by
  25 \fB\&.profile\fR files; see \fBprofile\fR(4).
  26 .sp
  27 .LP
  28 The following environmental variables can be used by applications and are
  29 expected to be set in the target run-time environment.
  30 .sp
  31 .ne 2
  32 .na
  33 \fB\fBHOME\fR\fR
  34 .ad
  35 .sp .6
  36 .RS 4n
  37 The name of the user's login directory, set by \fBlogin\fR(1) from the password
  38 file; see \fBpasswd\fR(4).
  39 .RE
  40 
  41 .sp
  42 .ne 2
  43 .na
  44 \fB\fBLANG\fR\fR
  45 .ad
  46 .sp .6
  47 .RS 4n
  48 The string used to specify internationalization information that allows users
  49 to work with different national conventions. The \fBsetlocale\fR(3C) function
  50 checks the \fBLANG\fR environment variable when it is called with \fB""\fR as

  51 the \fBlocale\fR argument.  \fBLANG\fR is used as the default locale if the
  52 corresponding environment variable for a particular category is unset or null.
  53 If, however,  \fBLC_ALL\fR is set to a valid, non-empty value, its contents are
  54 used to override both the \fBLANG\fR and the other \fBLC_*\fR variables. For
  55 example, when invoked as \fBsetlocale(LC_CTYPE, "")\fR, \fBsetlocale()\fR will
  56 query the \fBLC_CTYPE\fR environment variable first to see if it is set and
  57 non-null. If \fBLC_CTYPE\fR is not set or null, then \fBsetlocale()\fR will
  58 check the \fBLANG\fR environment variable to see if it is set and non-null. If
  59 both \fBLANG\fR and \fBLC_CTYPE\fR are unset or \fINULL\fR, the default "C"
  60 locale will be used to set the \fBLC_CTYPE\fR category.
  61 .sp
  62 Most commands will invoke \fBsetlocale(LC_ALL, "")\fR prior to any other
  63 processing. This allows the command to be used with different national
  64 conventions by setting the appropriate environment variables. In addition, some
  65 commands will use
  66 .BR uselocale (3C)
  67 to set a specific locale for opertations performed in a single thread.
  68 .sp
  69 The following environment variables correspond to each category of
  70 \fBsetlocale\fR(3C):
  71 .sp
  72 .ne 2
  73 .na
  74 \fB\fBLC_ALL\fR\fR
  75 .ad
  76 .sp .6
  77 .RS 4n
  78 If set to a valid, non-empty string value, override the values of \fBLANG\fR
  79 and all the other \fBLC_*\fRvariables.
  80 .RE
  81 
  82 .sp
  83 .ne 2
  84 .na
  85 \fB\fBLC_COLLATE\fR\fR
  86 .ad
  87 .sp .6


 504 .sp .6
 505 .RS 4n
 506 The \fId\fR^th day, (0 \(<= \fId\fR \(<= 6) of week \fIn\fR of month \fIm\fR of
 507 the year (1 \(<= \fIn\fR \(<= 5, 1 \(<= \fIm\fR \(<= 12), where week 5 means
 508 "the last \fId\fR-day in month \fIm\fR" which may occur in either the fourth or
 509 the fifth week). Week 1 is the first week in which the \fId\fR^th day occurs.
 510 Day zero is Sunday.
 511 .RE
 512 
 513 Implementation specific defaults are used for \fIstart\fR and \fIend\fR if
 514 these optional fields are not specified.
 515 .sp
 516 The \fItime\fR has the same format as \fIoffset\fR except that no leading sign
 517 ("-" or "+" ) is allowed. If \fItime\fR is not specified, the default value is
 518 02:00:00.
 519 .RE
 520 
 521 .RE
 522 
 523 .SH SEE ALSO
 524 .sp
 525 .LP
 526 \fBcat\fR(1), \fBdate\fR(1), \fBed\fR(1), \fBfmtmsg\fR(1), \fBlocaledef\fR(1),
 527 \fBlogin\fR(1), \fBls\fR(1), \fBmkmsgs\fR(1), \fBnice\fR(1), \fBnohup\fR(1),
 528 \fBsh\fR(1), \fBsort\fR(1), \fBtime\fR(1), \fBvi\fR(1), \fBexec\fR(2),
 529 \fBaddseverity\fR(3C), \fBcatopen\fR(3C), \fBctime\fR(3C), \fBctype\fR(3C),
 530 \fBfmtmsg\fR(3C), \fBgetdate\fR(3C), \fBgetnetpath\fR(3NSL), \fBgettext\fR(3C),
 531 \fBgettxt\fR(3C), \fBlocaleconv\fR(3C), \fBmblen\fR(3C), \fBmktime\fR(3C),

 532 \fBprintf\fR(3C), \fBsetlocale\fR(3C), \fBstrcoll\fR(3C), \fBstrftime\fR(3C),
 533 \fBstrtod\fR(3C), \fBstrxfrm\fR(3C), \fBuselocale\fR(3C), \fBTIMEZONE\fR(4),
 534 \fBnetconfig\fR(4), \fBpasswd\fR(4), \fBprofile\fR(4)
   1 '\" te
   2 .\" Copyright 1989 AT&T
   3 .\" Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
   4 .\" Copyright (c) 2014, Joyent, Inc.  All Rights Reserved
   5 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
   6 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   7 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   8 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   9 .TH ENVIRON 5 "Jun 26, 2014"
  10 .SH NAME
  11 environ \- user environment
  12 .SH DESCRIPTION

  13 .LP
  14 When a process begins execution, one of the \fBexec\fR family of functions
  15 makes available an array of strings called the environment; see \fBexec\fR(2).
  16 By convention, these strings have the form \fIvariable=value\fR, for example,
  17 \fBPATH=/sbin:/usr/sbin\fR. These environmental variables provide a way to make
  18 information about a program's environment available to programs.

  19 .LP
  20 A name may be placed in the environment by the \fBexport\fR command and
  21 \fIname\fR=\fIvalue\fR arguments in \fBsh\fR(1), or by one of the \fBexec\fR
  22 functions. It is unwise to conflict with certain shell variables such as
  23 \fBMAIL\fR, \fBPS1\fR, \fBPS2\fR, and \fBIFS\fR that are frequently exported by
  24 \fB\&.profile\fR files; see \fBprofile\fR(4).

  25 .LP
  26 The following environmental variables can be used by applications and are
  27 expected to be set in the target run-time environment.
  28 .sp
  29 .ne 2
  30 .na
  31 \fB\fBHOME\fR\fR
  32 .ad
  33 .sp .6
  34 .RS 4n
  35 The name of the user's login directory, set by \fBlogin\fR(1) from the password
  36 file; see \fBpasswd\fR(4).
  37 .RE
  38 
  39 .sp
  40 .ne 2
  41 .na
  42 \fB\fBLANG\fR\fR
  43 .ad
  44 .sp .6
  45 .RS 4n
  46 The string used to specify internationalization information that allows users
  47 to work with different national conventions. The \fBsetlocale\fR(3C) and
  48 \fBnewlocale\fR(3C) functions
  49 check the \fBLANG\fR environment variable when they are called with \fB""\fR as
  50 the \fBlocale\fR argument.  \fBLANG\fR is used as the default locale if the
  51 corresponding environment variable for a particular category is unset or null.
  52 If, however,  \fBLC_ALL\fR is set to a valid, non-empty value, its contents are
  53 used to override both the \fBLANG\fR and the other \fBLC_*\fR variables. For
  54 example, when invoked as \fBsetlocale(LC_CTYPE, "")\fR, \fBsetlocale()\fR will
  55 query the \fBLC_CTYPE\fR environment variable first to see if it is set and
  56 non-null. If \fBLC_CTYPE\fR is not set or null, then \fBsetlocale()\fR will
  57 check the \fBLANG\fR environment variable to see if it is set and non-null. If
  58 both \fBLANG\fR and \fBLC_CTYPE\fR are unset or \fINULL\fR, the default "C"
  59 locale will be used to set the \fBLC_CTYPE\fR category.
  60 .sp
  61 Most commands will invoke \fBsetlocale(LC_ALL, "")\fR prior to any other
  62 processing. This allows the command to be used with different national
  63 conventions by setting the appropriate environment variables. In addition, some
  64 commands will use
  65 .BR uselocale (3C)
  66 to set a thread-specific locale.
  67 .sp
  68 The following environment variables correspond to each category of
  69 \fBsetlocale\fR(3C):
  70 .sp
  71 .ne 2
  72 .na
  73 \fB\fBLC_ALL\fR\fR
  74 .ad
  75 .sp .6
  76 .RS 4n
  77 If set to a valid, non-empty string value, override the values of \fBLANG\fR
  78 and all the other \fBLC_*\fRvariables.
  79 .RE
  80 
  81 .sp
  82 .ne 2
  83 .na
  84 \fB\fBLC_COLLATE\fR\fR
  85 .ad
  86 .sp .6


 503 .sp .6
 504 .RS 4n
 505 The \fId\fR^th day, (0 \(<= \fId\fR \(<= 6) of week \fIn\fR of month \fIm\fR of
 506 the year (1 \(<= \fIn\fR \(<= 5, 1 \(<= \fIm\fR \(<= 12), where week 5 means
 507 "the last \fId\fR-day in month \fIm\fR" which may occur in either the fourth or
 508 the fifth week). Week 1 is the first week in which the \fId\fR^th day occurs.
 509 Day zero is Sunday.
 510 .RE
 511 
 512 Implementation specific defaults are used for \fIstart\fR and \fIend\fR if
 513 these optional fields are not specified.
 514 .sp
 515 The \fItime\fR has the same format as \fIoffset\fR except that no leading sign
 516 ("-" or "+" ) is allowed. If \fItime\fR is not specified, the default value is
 517 02:00:00.
 518 .RE
 519 
 520 .RE
 521 
 522 .SH SEE ALSO

 523 .LP
 524 \fBcat\fR(1), \fBdate\fR(1), \fBed\fR(1), \fBfmtmsg\fR(1), \fBlocaledef\fR(1),
 525 \fBlogin\fR(1), \fBls\fR(1), \fBmkmsgs\fR(1), \fBnice\fR(1), \fBnohup\fR(1),
 526 \fBsh\fR(1), \fBsort\fR(1), \fBtime\fR(1), \fBvi\fR(1), \fBexec\fR(2),
 527 \fBaddseverity\fR(3C), \fBcatopen\fR(3C), \fBctime\fR(3C), \fBctype\fR(3C),
 528 \fBfmtmsg\fR(3C), \fBgetdate\fR(3C), \fBgetnetpath\fR(3NSL), \fBgettext\fR(3C),
 529 \fBgettxt\fR(3C), \fBlocaleconv\fR(3C), \fBmblen\fR(3C), \fBmktime\fR(3C),
 530 \fBnewlocale\fR(3C),
 531 \fBprintf\fR(3C), \fBsetlocale\fR(3C), \fBstrcoll\fR(3C), \fBstrftime\fR(3C),
 532 \fBstrtod\fR(3C), \fBstrxfrm\fR(3C), \fBuselocale\fR(3C), \fBTIMEZONE\fR(4),
 533 \fBnetconfig\fR(4), \fBpasswd\fR(4), \fBprofile\fR(4)