isposix

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

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

cal.html (9691B)


      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>cal</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/c17.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/cat.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="cal" id="cal"></a> <a name="tag_20_12" id="tag_20_12"></a><!-- cal -->
     28 <h4 class="mansect"><a name="tag_20_12_01" id="tag_20_12_01"></a>NAME</h4>
     29 <blockquote>cal — print a calendar</blockquote>
     30 <h4 class="mansect"><a name="tag_20_12_02" id="tag_20_12_02"></a>SYNOPSIS</h4>
     31 <blockquote class="synopsis">
     32 <div class="box"><code><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
     33 "[Option Start]" border="0"> cal</tt> <b>[[</b><i>month</i><b>]</b> <i>year</i><b>]</b> <tt><img src="../images/opt-end.gif" alt=
     34 "[Option End]" border="0"></tt></code></div>
     35 </blockquote>
     36 <h4 class="mansect"><a name="tag_20_12_03" id="tag_20_12_03"></a>DESCRIPTION</h4>
     37 <blockquote>
     38 <p>The <i>cal</i> utility shall write a calendar to standard output using the Julian calendar for dates from January 1, 1 through
     39 September 2, 1752 and the Gregorian calendar for dates from September 14, 1752 through December 31, 9999 as though the Gregorian
     40 calendar had been adopted on September 14, 1752.</p>
     41 <p>If no operands are given, <i>cal</i> shall produce a one-month calendar for the current month in the current year. If only the
     42 <i>year</i> operand is given, <i>cal</i> shall produce a calendar for all twelve months in the given calendar year. If both
     43 <i>month</i> and <i>year</i> operands are given, <i>cal</i> shall produce a one-month calendar for the given month in the given
     44 year.</p>
     45 </blockquote>
     46 <h4 class="mansect"><a name="tag_20_12_04" id="tag_20_12_04"></a>OPTIONS</h4>
     47 <blockquote>
     48 <p>None.</p>
     49 </blockquote>
     50 <h4 class="mansect"><a name="tag_20_12_05" id="tag_20_12_05"></a>OPERANDS</h4>
     51 <blockquote>
     52 <p>The following operands shall be supported:</p>
     53 <dl compact>
     54 <dd></dd>
     55 <dt><i>month</i></dt>
     56 <dd>Specify the month to be displayed, represented as a decimal integer from 1 (January) to 12 (December).</dd>
     57 <dt><i>year</i></dt>
     58 <dd>Specify the year for which the calendar is displayed, represented as a decimal integer from 1 to 9999.</dd>
     59 </dl>
     60 </blockquote>
     61 <h4 class="mansect"><a name="tag_20_12_06" id="tag_20_12_06"></a>STDIN</h4>
     62 <blockquote>
     63 <p>Not used.</p>
     64 </blockquote>
     65 <h4 class="mansect"><a name="tag_20_12_07" id="tag_20_12_07"></a>INPUT FILES</h4>
     66 <blockquote>
     67 <p>None.</p>
     68 </blockquote>
     69 <h4 class="mansect"><a name="tag_20_12_08" id="tag_20_12_08"></a>ENVIRONMENT VARIABLES</h4>
     70 <blockquote>
     71 <p>The following environment variables shall affect the execution of <i>cal</i>:</p>
     72 <dl compact>
     73 <dd></dd>
     74 <dt><i>LANG</i></dt>
     75 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href=
     76 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization
     77 variables used to determine the values of locale categories.)</dd>
     78 <dt><i>LC_ALL</i></dt>
     79 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
     80 <dt><i>LC_CTYPE</i></dt>
     81 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
     82 opposed to multi-byte characters in arguments).</dd>
     83 <dt><i>LC_MESSAGES</i></dt>
     84 <dd><br>
     85 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error, and
     86 informative messages written to standard output.</dd>
     87 <dt><i>LC_TIME</i></dt>
     88 <dd>Determine the format and contents of the calendar.</dd>
     89 <dt><i>NLSPATH</i></dt>
     90 <dd>Determine the location of messages objects and message catalogs.</dd>
     91 <dt><i>TZ</i></dt>
     92 <dd>Determine the timezone used to calculate the value of the current month.</dd>
     93 </dl>
     94 </blockquote>
     95 <h4 class="mansect"><a name="tag_20_12_09" id="tag_20_12_09"></a>ASYNCHRONOUS EVENTS</h4>
     96 <blockquote>
     97 <p>Default.</p>
     98 </blockquote>
     99 <h4 class="mansect"><a name="tag_20_12_10" id="tag_20_12_10"></a>STDOUT</h4>
    100 <blockquote>
    101 <p>The standard output shall be used to display the calendar, in an unspecified format.</p>
    102 </blockquote>
    103 <h4 class="mansect"><a name="tag_20_12_11" id="tag_20_12_11"></a>STDERR</h4>
    104 <blockquote>
    105 <p>The standard error shall be used only for diagnostic messages.</p>
    106 </blockquote>
    107 <h4 class="mansect"><a name="tag_20_12_12" id="tag_20_12_12"></a>OUTPUT FILES</h4>
    108 <blockquote>
    109 <p>None.</p>
    110 </blockquote>
    111 <h4 class="mansect"><a name="tag_20_12_13" id="tag_20_12_13"></a>EXTENDED DESCRIPTION</h4>
    112 <blockquote>
    113 <p>None.</p>
    114 </blockquote>
    115 <h4 class="mansect"><a name="tag_20_12_14" id="tag_20_12_14"></a>EXIT STATUS</h4>
    116 <blockquote>
    117 <p>The following exit values shall be returned:</p>
    118 <dl compact>
    119 <dd></dd>
    120 <dt>&nbsp;0</dt>
    121 <dd>Successful completion.</dd>
    122 <dt>&gt;0</dt>
    123 <dd>An error occurred.</dd>
    124 </dl>
    125 </blockquote>
    126 <h4 class="mansect"><a name="tag_20_12_15" id="tag_20_12_15"></a>CONSEQUENCES OF ERRORS</h4>
    127 <blockquote>
    128 <p>Default.</p>
    129 </blockquote>
    130 <hr>
    131 <div class="box"><em>The following sections are informative.</em></div>
    132 <h4 class="mansect"><a name="tag_20_12_16" id="tag_20_12_16"></a>APPLICATION USAGE</h4>
    133 <blockquote>
    134 <p>Note that:</p>
    135 <pre>
    136 <tt>cal 83
    137 </tt></pre>
    138 <p>refers to A.D. 83, not 1983.</p>
    139 </blockquote>
    140 <h4 class="mansect"><a name="tag_20_12_17" id="tag_20_12_17"></a>EXAMPLES</h4>
    141 <blockquote>
    142 <p>None.</p>
    143 </blockquote>
    144 <h4 class="mansect"><a name="tag_20_12_18" id="tag_20_12_18"></a>RATIONALE</h4>
    145 <blockquote>
    146 <p>Earlier versions of this standard incorrectly required that the command:</p>
    147 <pre>
    148 <tt>cal 2000
    149 </tt></pre>
    150 <p>write a one-month calendar for the current calendar month (no matter what the current year is) in the year 2000 to standard
    151 output. This did not match historic practice in any known version of the <i>cal</i> utility. The description has been updated to
    152 match historic practice. When only the <i>year</i> operand is given, <i>cal</i> writes a twelve-month calendar for the specified
    153 year.</p>
    154 </blockquote>
    155 <h4 class="mansect"><a name="tag_20_12_19" id="tag_20_12_19"></a>FUTURE DIRECTIONS</h4>
    156 <blockquote>
    157 <p>A future version of this standard may support locale-specific recognition of the date of adoption of the Gregorian calendar.</p>
    158 </blockquote>
    159 <h4 class="mansect"><a name="tag_20_12_20" id="tag_20_12_20"></a>SEE ALSO</h4>
    160 <blockquote>
    161 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a></p>
    162 </blockquote>
    163 <h4 class="mansect"><a name="tag_20_12_21" id="tag_20_12_21"></a>CHANGE HISTORY</h4>
    164 <blockquote>
    165 <p>First released in Issue 2.</p>
    166 </blockquote>
    167 <h4 class="mansect"><a name="tag_20_12_22" id="tag_20_12_22"></a>Issue 6</h4>
    168 <blockquote>
    169 <p>The DESCRIPTION is updated to allow for traditional behavior for years before the adoption of the Gregorian calendar.</p>
    170 </blockquote>
    171 <h4 class="mansect"><a name="tag_20_12_23" id="tag_20_12_23"></a>Issue 7</h4>
    172 <blockquote>
    173 <p>SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.</p>
    174 <p>POSIX.1-2008, Technical Corrigendum 1, XCU/TC1-2008/0074 [56] and XCU/TC1-2008/0075 [56] are applied.</p>
    175 </blockquote>
    176 <h4 class="mansect"><a name="tag_20_12_24" id="tag_20_12_24"></a>Issue 8</h4>
    177 <blockquote>
    178 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p>
    179 </blockquote>
    180 <div class="box"><em>End of informative text.</em></div>
    181 <hr>
    182 <p>&nbsp;</p>
    183 <a href="#top"><span class="topOfPage">return to top of page</span></a><br>
    184 <hr size="2" noshade>
    185 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br>
    186 POSIX™ is a Trademark of The IEEE.<br>
    187 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br>
    188 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
    189 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a>
    190 ]</font></center>
    191 <hr size="2" noshade>
    192 <div class="NAVHEADER">
    193 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
    194 <tr class="nav">
    195 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/c17.html" accesskey="P">&lt;&lt;&lt;
    196 Previous</a></td>
    197 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
    198 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/cat.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
    199 </tr>
    200 </table>
    201 <hr align="left" width="100%"></div>
    202 </body>
    203 </html>