Print this page
8858 /usr/bin/grep doesn't support -E option
4580 /usr/bin/grep can't handle multibyte characters
8929 8868 tests are not delivered with system/test/utiltest
8860 Example in grep(1) is incorrect
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuripv@gmx.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/locale.1
          +++ new/usr/src/man/man1/locale.1
   1    1  '\" te
   2    2  .\"  Copyright (c) 1992, X/Open Company Limited  All Rights Reserved  Portions Copyright (c) 1995, Sun Microsystems, Inc.  All Rights Reserved
   3    3  .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   4    4  .\" http://www.opengroup.org/bookstore/.
   5    5  .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   6    6  .\"  This notice shall appear on any product containing this material.
   7    7  .\" 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.
   8    8  .\" 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.
   9    9  .\" 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]
  10      -.TH LOCALE 1 "Dec 20, 1996"
       10 +.TH LOCALE 1 "Nov 28, 2017"
  11   11  .SH NAME
  12   12  locale \- get locale-specific information
  13   13  .SH SYNOPSIS
  14   14  .LP
  15   15  .nf
  16   16  \fBlocale\fR [\fB-a\fR | \fB-m\fR]
  17   17  .fi
  18   18  
  19   19  .LP
  20   20  .nf
  21   21  \fBlocale\fR [\fB-ck\fR] \fIname\fR...
  22   22  .fi
  23   23  
  24   24  .SH DESCRIPTION
  25      -.sp
  26   25  .LP
  27   26  The \fBlocale\fR utility writes information about the current locale
  28   27  environment, or all public locales, to the standard output. For the purposes of
  29   28  this section, a \fIpublic locale\fR is one provided by the implementation that
  30   29  is accessible to the application.
  31   30  .sp
  32   31  .LP
  33   32  When \fBlocale\fR is invoked without any arguments, it summarizes the current
  34   33  locale environment for each locale category as determined by the settings of
  35   34  the environment variables.
↓ open down ↓ 9 lines elided ↑ open up ↑
  45   44  that keyword.
  46   45  .RE
  47   46  .RS +4
  48   47  .TP
  49   48  .ie t \(bu
  50   49  .el o
  51   50  Specifying a category name selects the named category and all keywords in that
  52   51  category.
  53   52  .RE
  54   53  .SH OPTIONS
  55      -.sp
  56   54  .LP
  57   55  The following options are supported:
  58   56  .sp
  59   57  .ne 2
  60   58  .na
  61   59  \fB\fB-a\fR\fR
  62   60  .ad
  63   61  .RS 6n
  64   62  Writes information about all available public locales. The available locales
  65   63  include \fBPOSIX\fR, representing the POSIX locale.
↓ open down ↓ 24 lines elided ↑ open up ↑
  90   88  .sp
  91   89  .ne 2
  92   90  .na
  93   91  \fB\fB-m\fR\fR
  94   92  .ad
  95   93  .RS 6n
  96   94  Writes names of available charmaps; see  \fBlocaledef\fR(1).
  97   95  .RE
  98   96  
  99   97  .SH OPERANDS
 100      -.sp
 101   98  .LP
 102   99  The following operand is supported:
 103  100  .sp
 104  101  .ne 2
 105  102  .na
 106  103  \fB\fIname\fR\fR
 107  104  .ad
 108  105  .RS 8n
 109  106  The name of a locale category, the name of a keyword in a locale category, or
 110  107  the reserved name \fBcharmap\fR. The named category or keyword will be selected
↓ open down ↓ 64 lines elided ↑ open up ↑
 175  172  .sp
 176  173  
 177  174  .sp
 178  175  .LP
 179  176  The following command shows an application of \fBlocale\fR to determine whether
 180  177  a user-supplied response is affirmative:
 181  178  
 182  179  .sp
 183  180  .in +2
 184  181  .nf
 185      -\fBif printf "%s\en" "$response" | /usr/xpg4/bin/grep -Eq\e
      182 +\fBif printf "%s\en" "$response" | /usr/bin/grep -Eq\e
 186  183          "$(locale yesexpr)"
 187  184  then
 188  185      affirmative processing goes here
 189  186  else
 190  187      non-affirmative processing goes here
 191  188  fi\fR
 192  189  .fi
 193  190  .in -2
 194  191  .sp
 195  192  
 196  193  .SH ENVIRONMENT VARIABLES
 197      -.sp
 198  194  .LP
 199  195  See \fBenviron\fR(5) for the descriptions of  \fBLANG\fR, \fBLC_ALL\fR,
 200  196  \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
 201  197  .sp
 202  198  .LP
 203  199  The \fBLANG\fR, \fBLC_*\fR, and \fBNLSPATH\fR environment variables must
 204  200  specify the current locale environment to be written out. These environment
 205  201  variables will be used if the \fB-a\fR option is not specified.
 206  202  .SH EXIT STATUS
 207      -.sp
 208  203  .LP
 209  204  The following exit values are returned:
 210  205  .sp
 211  206  .ne 2
 212  207  .na
 213  208  \fB\fB0\fR\fR
 214  209  .ad
 215  210  .RS 6n
 216  211  All the requested information was found and output successfully.
 217  212  .RE
↓ open down ↓ 1 lines elided ↑ open up ↑
 219  214  .sp
 220  215  .ne 2
 221  216  .na
 222  217  \fB\fB>0\fR\fR
 223  218  .ad
 224  219  .RS 6n
 225  220  An error occurred.
 226  221  .RE
 227  222  
 228  223  .SH ATTRIBUTES
 229      -.sp
 230  224  .LP
 231  225  See \fBattributes\fR(5) for descriptions of the following attributes:
 232  226  .sp
 233  227  
 234  228  .sp
 235  229  .TS
 236  230  box;
 237  231  c | c
 238  232  l | l .
 239  233  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 240  234  _
 241  235  CSI     Enabled
 242  236  _
 243  237  Interface Stability     Standard
 244  238  .TE
 245  239  
 246  240  .SH SEE ALSO
 247      -.sp
 248  241  .LP
 249  242  \fBlocaledef\fR(1), \fBattributes\fR(5), \fBcharmap\fR(5), \fBenviron\fR(5),
 250  243  \fBlocale\fR(5), \fBstandards\fR(5)
 251  244  .SH NOTES
 252      -.sp
 253  245  .LP
 254  246  If \fBLC_CTYPE\fR or keywords in the category \fBLC_CTYPE\fR are specified,
 255  247  only the values in the range \fB0x00\fR-\fB0x7f\fR are written out.
 256  248  .sp
 257  249  .LP
 258  250  If \fBLC_COLLATE\fR or keywords in the category \fBLC_COLLATE\fR are specified,
 259  251  no actual values are written out.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX