isposix

Un outil pour savoir si une commande est posix - retour accueil

git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |

logname.html (8207B)


      1 <!-- Copyright 2001-2024 IEEE and The Open Group, All Rights Reserved -->
      2 <!DOCTYPE HTML>
      3 <html lang="en">
      4 <head>
      5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.8.0">
      6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      7 <link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group rhtm tool v1.2.4 -->
      8 <!-- Copyright (c) 2001-2024 The Open Group, All Rights Reserved -->
      9 <title>logname</title>
     10 </head>
     11 <body bgcolor="white">
     12 <div class="NAVHEADER">
     13 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
     14 <tr class="nav">
     15 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/logger.html" accesskey="P">&lt;&lt;&lt;
     16 Previous</a></td>
     17 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
     18 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/lp.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
     19 </tr>
     20 </table>
     21 <hr align="left" width="100%"></div>
     22 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3">
     23 <center><font size="2">The Open Group Base Specifications Issue 8<br>
     24 IEEE Std 1003.1-2024<br>
     25 Copyright © 2001-2024 The IEEE and The Open Group</font></center>
     26 <hr size="2" noshade>
     27 <a name="top" id="top"></a> <a name="logname" id="logname"></a> <a name="tag_20_71" id="tag_20_71"></a><!-- logname -->
     28 <h4 class="mansect"><a name="tag_20_71_01" id="tag_20_71_01"></a>NAME</h4>
     29 <blockquote>logname — return the user's login name</blockquote>
     30 <h4 class="mansect"><a name="tag_20_71_02" id="tag_20_71_02"></a>SYNOPSIS</h4>
     31 <blockquote class="synopsis">
     32 <p><code><tt>logname</tt></code></p>
     33 </blockquote>
     34 <h4 class="mansect"><a name="tag_20_71_03" id="tag_20_71_03"></a>DESCRIPTION</h4>
     35 <blockquote>
     36 <p>The <i>logname</i> utility shall write the user's login name to standard output. The login name shall be the string that would
     37 be returned by the <a href="../functions/getlogin.html"><i>getlogin</i>()</a> function defined in the System Interfaces volume of
     38 POSIX.1-2024. Under the conditions where the <a href="../functions/getlogin.html"><i>getlogin</i>()</a> function would fail, the
     39 <i>logname</i> utility shall write a diagnostic message to standard error and exit with a non-zero exit status.</p>
     40 </blockquote>
     41 <h4 class="mansect"><a name="tag_20_71_04" id="tag_20_71_04"></a>OPTIONS</h4>
     42 <blockquote>
     43 <p>None.</p>
     44 </blockquote>
     45 <h4 class="mansect"><a name="tag_20_71_05" id="tag_20_71_05"></a>OPERANDS</h4>
     46 <blockquote>
     47 <p>None.</p>
     48 </blockquote>
     49 <h4 class="mansect"><a name="tag_20_71_06" id="tag_20_71_06"></a>STDIN</h4>
     50 <blockquote>
     51 <p>Not used.</p>
     52 </blockquote>
     53 <h4 class="mansect"><a name="tag_20_71_07" id="tag_20_71_07"></a>INPUT FILES</h4>
     54 <blockquote>
     55 <p>None.</p>
     56 </blockquote>
     57 <h4 class="mansect"><a name="tag_20_71_08" id="tag_20_71_08"></a>ENVIRONMENT VARIABLES</h4>
     58 <blockquote>
     59 <p>The following environment variables shall affect the execution of <i>logname</i>:</p>
     60 <dl compact>
     61 <dd></dd>
     62 <dt><i>LANG</i></dt>
     63 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href=
     64 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization
     65 variables used to determine the values of locale categories.)</dd>
     66 <dt><i>LC_ALL</i></dt>
     67 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
     68 <dt><i>LC_CTYPE</i></dt>
     69 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
     70 opposed to multi-byte characters in arguments).</dd>
     71 <dt><i>LC_MESSAGES</i></dt>
     72 <dd><br>
     73 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd>
     74 <dt><i>NLSPATH</i></dt>
     75 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
     76 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border=
     77 "0"></dd>
     78 </dl>
     79 </blockquote>
     80 <h4 class="mansect"><a name="tag_20_71_09" id="tag_20_71_09"></a>ASYNCHRONOUS EVENTS</h4>
     81 <blockquote>
     82 <p>Default.</p>
     83 </blockquote>
     84 <h4 class="mansect"><a name="tag_20_71_10" id="tag_20_71_10"></a>STDOUT</h4>
     85 <blockquote>
     86 <p>The <i>logname</i> utility output shall be a single line consisting of the user's login name:</p>
     87 <pre>
     88 <tt>"%s\n", &lt;</tt><i>login name</i><tt>&gt;
     89 </tt></pre></blockquote>
     90 <h4 class="mansect"><a name="tag_20_71_11" id="tag_20_71_11"></a>STDERR</h4>
     91 <blockquote>
     92 <p>The standard error shall be used only for diagnostic messages.</p>
     93 </blockquote>
     94 <h4 class="mansect"><a name="tag_20_71_12" id="tag_20_71_12"></a>OUTPUT FILES</h4>
     95 <blockquote>
     96 <p>None.</p>
     97 </blockquote>
     98 <h4 class="mansect"><a name="tag_20_71_13" id="tag_20_71_13"></a>EXTENDED DESCRIPTION</h4>
     99 <blockquote>
    100 <p>None.</p>
    101 </blockquote>
    102 <h4 class="mansect"><a name="tag_20_71_14" id="tag_20_71_14"></a>EXIT STATUS</h4>
    103 <blockquote>
    104 <p>The following exit values shall be returned:</p>
    105 <dl compact>
    106 <dd></dd>
    107 <dt>&nbsp;0</dt>
    108 <dd>Successful completion.</dd>
    109 <dt>&gt;0</dt>
    110 <dd>An error occurred.</dd>
    111 </dl>
    112 </blockquote>
    113 <h4 class="mansect"><a name="tag_20_71_15" id="tag_20_71_15"></a>CONSEQUENCES OF ERRORS</h4>
    114 <blockquote>
    115 <p>Default.</p>
    116 </blockquote>
    117 <hr>
    118 <div class="box"><em>The following sections are informative.</em></div>
    119 <h4 class="mansect"><a name="tag_20_71_16" id="tag_20_71_16"></a>APPLICATION USAGE</h4>
    120 <blockquote>
    121 <p>The <i>logname</i> utility explicitly ignores the <i>LOGNAME</i> environment variable because environment changes could produce
    122 erroneous results.</p>
    123 </blockquote>
    124 <h4 class="mansect"><a name="tag_20_71_17" id="tag_20_71_17"></a>EXAMPLES</h4>
    125 <blockquote>
    126 <p>None.</p>
    127 </blockquote>
    128 <h4 class="mansect"><a name="tag_20_71_18" id="tag_20_71_18"></a>RATIONALE</h4>
    129 <blockquote>
    130 <p>The <b>passwd</b> file is not listed as required because the implementation may have other means of mapping login names.</p>
    131 </blockquote>
    132 <h4 class="mansect"><a name="tag_20_71_19" id="tag_20_71_19"></a>FUTURE DIRECTIONS</h4>
    133 <blockquote>
    134 <p>None.</p>
    135 </blockquote>
    136 <h4 class="mansect"><a name="tag_20_71_20" id="tag_20_71_20"></a>SEE ALSO</h4>
    137 <blockquote>
    138 <p><a href="../utilities/id.html#"><i>id</i></a> , <a href="../utilities/who.html#"><i>who</i></a></p>
    139 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a></p>
    140 <p>XSH <a href="../functions/getlogin.html#"><i>getlogin</i></a></p>
    141 </blockquote>
    142 <h4 class="mansect"><a name="tag_20_71_21" id="tag_20_71_21"></a>CHANGE HISTORY</h4>
    143 <blockquote>
    144 <p>First released in Issue 2.</p>
    145 </blockquote>
    146 <h4 class="mansect"><a name="tag_20_71_22" id="tag_20_71_22"></a>Issue 8</h4>
    147 <blockquote>
    148 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p>
    149 </blockquote>
    150 <div class="box"><em>End of informative text.</em></div>
    151 <hr>
    152 <p>&nbsp;</p>
    153 <a href="#top"><span class="topOfPage">return to top of page</span></a><br>
    154 <hr size="2" noshade>
    155 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br>
    156 POSIX™ is a Trademark of The IEEE.<br>
    157 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br>
    158 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
    159 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a>
    160 ]</font></center>
    161 <hr size="2" noshade>
    162 <div class="NAVHEADER">
    163 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
    164 <tr class="nav">
    165 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/logger.html" accesskey="P">&lt;&lt;&lt;
    166 Previous</a></td>
    167 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
    168 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/lp.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
    169 </tr>
    170 </table>
    171 <hr align="left" width="100%"></div>
    172 </body>
    173 </html>