isposix

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

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

tput.html (12065B)


      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>tput</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/touch.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/tr.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="tput" id="tput"></a> <a name="tag_20_125" id="tag_20_125"></a><!-- tput -->
     28 <h4 class="mansect"><a name="tag_20_125_01" id="tag_20_125_01"></a>NAME</h4>
     29 <blockquote>tput — change terminal characteristics</blockquote>
     30 <h4 class="mansect"><a name="tag_20_125_02" id="tag_20_125_02"></a>SYNOPSIS</h4>
     31 <blockquote class="synopsis">
     32 <p><code><tt>tput</tt> <b>[</b><tt>-T</tt> <i>type</i><b>]</b> <i>operand</i><tt>...</tt></code></p>
     33 </blockquote>
     34 <h4 class="mansect"><a name="tag_20_125_03" id="tag_20_125_03"></a>DESCRIPTION</h4>
     35 <blockquote>
     36 <p>The <i>tput</i> utility shall display terminal-dependent information. The manner in which this information is retrieved is
     37 unspecified. The information displayed shall clear the terminal screen, initialize the user's terminal, or reset the user's
     38 terminal, depending on the operand given. The exact consequences of displaying this information are unspecified.</p>
     39 </blockquote>
     40 <h4 class="mansect"><a name="tag_20_125_04" id="tag_20_125_04"></a>OPTIONS</h4>
     41 <blockquote>
     42 <p>The <i>tput</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax
     43 Guidelines</i></a> .</p>
     44 <p>The following option shall be supported:</p>
     45 <dl compact>
     46 <dd></dd>
     47 <dt><b>-T&nbsp;</b><i>type</i></dt>
     48 <dd>Indicate the type of terminal. If this option is not supplied and the <i>TERM</i> variable is unset or null, an unspecified
     49 default terminal type shall be used. The setting of <i>type</i> shall take precedence over the value in <i>TERM .</i></dd>
     50 </dl>
     51 </blockquote>
     52 <h4 class="mansect"><a name="tag_20_125_05" id="tag_20_125_05"></a>OPERANDS</h4>
     53 <blockquote>
     54 <p>The following strings shall be supported as operands by the implementation in the POSIX locale:</p>
     55 <dl compact>
     56 <dd></dd>
     57 <dt><b>clear</b></dt>
     58 <dd>Display the clear-screen sequence.</dd>
     59 <dt><b>init</b></dt>
     60 <dd>Display the sequence that initializes the user's terminal in an implementation-defined manner.</dd>
     61 <dt><b>reset</b></dt>
     62 <dd>Display the sequence that resets the user's terminal in an implementation-defined manner.</dd>
     63 </dl>
     64 <p>If a terminal does not support any of the operations described by these operands, this shall not be considered an error
     65 condition.</p>
     66 </blockquote>
     67 <h4 class="mansect"><a name="tag_20_125_06" id="tag_20_125_06"></a>STDIN</h4>
     68 <blockquote>
     69 <p>Not used.</p>
     70 </blockquote>
     71 <h4 class="mansect"><a name="tag_20_125_07" id="tag_20_125_07"></a>INPUT FILES</h4>
     72 <blockquote>
     73 <p>None.</p>
     74 </blockquote>
     75 <h4 class="mansect"><a name="tag_20_125_08" id="tag_20_125_08"></a>ENVIRONMENT VARIABLES</h4>
     76 <blockquote>
     77 <p>The following environment variables shall affect the execution of <i>tput</i>:</p>
     78 <dl compact>
     79 <dd></dd>
     80 <dt><i>LANG</i></dt>
     81 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href=
     82 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization
     83 variables used to determine the values of locale categories.)</dd>
     84 <dt><i>LC_ALL</i></dt>
     85 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
     86 <dt><i>LC_CTYPE</i></dt>
     87 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
     88 opposed to multi-byte characters in arguments).</dd>
     89 <dt><i>LC_MESSAGES</i></dt>
     90 <dd><br>
     91 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd>
     92 <dt><i>NLSPATH</i></dt>
     93 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
     94 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border=
     95 "0"></dd>
     96 <dt><i>TERM</i></dt>
     97 <dd>Determine the terminal type. If this variable is unset or null, and if the <b>-T</b> option is not specified, an unspecified
     98 default terminal type shall be used.</dd>
     99 </dl>
    100 </blockquote>
    101 <h4 class="mansect"><a name="tag_20_125_09" id="tag_20_125_09"></a>ASYNCHRONOUS EVENTS</h4>
    102 <blockquote>
    103 <p>Default.</p>
    104 </blockquote>
    105 <h4 class="mansect"><a name="tag_20_125_10" id="tag_20_125_10"></a>STDOUT</h4>
    106 <blockquote>
    107 <p>If standard output is a terminal device, it may be used for writing the appropriate sequence to clear the screen or reset or
    108 initialize the terminal. If standard output is not a terminal device, undefined results occur.</p>
    109 </blockquote>
    110 <h4 class="mansect"><a name="tag_20_125_11" id="tag_20_125_11"></a>STDERR</h4>
    111 <blockquote>
    112 <p>The standard error shall be used only for diagnostic messages.</p>
    113 </blockquote>
    114 <h4 class="mansect"><a name="tag_20_125_12" id="tag_20_125_12"></a>OUTPUT FILES</h4>
    115 <blockquote>
    116 <p>None.</p>
    117 </blockquote>
    118 <h4 class="mansect"><a name="tag_20_125_13" id="tag_20_125_13"></a>EXTENDED DESCRIPTION</h4>
    119 <blockquote>
    120 <p>None.</p>
    121 </blockquote>
    122 <h4 class="mansect"><a name="tag_20_125_14" id="tag_20_125_14"></a>EXIT STATUS</h4>
    123 <blockquote>
    124 <p>The following exit values shall be returned:</p>
    125 <dl compact>
    126 <dd></dd>
    127 <dt>&nbsp;0</dt>
    128 <dd>The requested string was written successfully.</dd>
    129 <dt>&nbsp;1</dt>
    130 <dd>Unspecified.</dd>
    131 <dt>&nbsp;2</dt>
    132 <dd>Usage error.</dd>
    133 <dt>&nbsp;3</dt>
    134 <dd>No information is available about the specified terminal type.</dd>
    135 <dt>&nbsp;4</dt>
    136 <dd>The specified operand is invalid.</dd>
    137 <dt>&gt;4</dt>
    138 <dd>An error occurred.</dd>
    139 </dl>
    140 </blockquote>
    141 <h4 class="mansect"><a name="tag_20_125_15" id="tag_20_125_15"></a>CONSEQUENCES OF ERRORS</h4>
    142 <blockquote>
    143 <p>If one of the operands is not available for the terminal, <i>tput</i> continues processing the remaining operands.</p>
    144 </blockquote>
    145 <hr>
    146 <div class="box"><em>The following sections are informative.</em></div>
    147 <h4 class="mansect"><a name="tag_20_125_16" id="tag_20_125_16"></a>APPLICATION USAGE</h4>
    148 <blockquote>
    149 <p>The difference between resetting and initializing a terminal is left unspecified, as they vary greatly based on hardware types.
    150 In general, resetting is a more severe action.</p>
    151 <p>Some terminals use control characters to perform the stated functions, and on such terminals it might make sense to use
    152 <i>tput</i> to store the initialization strings in a file or environment variable for later use. However, because other terminals
    153 might rely on system calls to do this work, the standard output cannot be used in a portable manner, such as the following
    154 non-portable constructs:</p>
    155 <pre>
    156 <tt>ClearVar=`tput clear`
    157 tput reset | mailx -s "Wake Up" ddg
    158 </tt></pre></blockquote>
    159 <h4 class="mansect"><a name="tag_20_125_17" id="tag_20_125_17"></a>EXAMPLES</h4>
    160 <blockquote>
    161 <ol>
    162 <li>
    163 <p>Initialize the terminal according to the type of terminal in the environmental variable <i>TERM .</i> This command can be
    164 included in a <b>.profile</b> file.</p>
    165 <pre>
    166 <tt>tput init
    167 </tt></pre></li>
    168 <li>
    169 <p>Reset a 450 terminal.</p>
    170 <pre>
    171 <tt>tput -T 450 reset
    172 </tt></pre></li>
    173 </ol>
    174 </blockquote>
    175 <h4 class="mansect"><a name="tag_20_125_18" id="tag_20_125_18"></a>RATIONALE</h4>
    176 <blockquote>
    177 <p>The list of operands was reduced to a minimum for the following reasons:</p>
    178 <ul>
    179 <li>
    180 <p>The only features chosen were those that were likely to be used by human users interacting with a terminal.</p>
    181 </li>
    182 <li>
    183 <p>Specifying the full <i>terminfo</i> set was not considered desirable, but the standard developers did not want to select among
    184 operands.</p>
    185 </li>
    186 <li>
    187 <p>This volume of POSIX.1-2024 does not attempt to provide applications with sophisticated terminal handling capabilities, as that
    188 falls outside of its assigned scope and intersects with the responsibilities of other standards bodies.</p>
    189 </li>
    190 </ul>
    191 <p>The difference between resetting and initializing a terminal is left unspecified as this varies greatly based on hardware types.
    192 In general, resetting is a more severe action.</p>
    193 <p>The exit status of 1 is historically reserved for finding out if a Boolean operand is not set. Although the operands were
    194 reduced to a minimum, the exit status of 1 should still be reserved for the Boolean operands, for those sites that wish to support
    195 them.</p>
    196 </blockquote>
    197 <h4 class="mansect"><a name="tag_20_125_19" id="tag_20_125_19"></a>FUTURE DIRECTIONS</h4>
    198 <blockquote>
    199 <p>None.</p>
    200 </blockquote>
    201 <h4 class="mansect"><a name="tag_20_125_20" id="tag_20_125_20"></a>SEE ALSO</h4>
    202 <blockquote>
    203 <p><a href="../utilities/stty.html#"><i>stty</i></a> , <a href="../utilities/tabs.html#"><i>tabs</i></a></p>
    204 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href=
    205 "../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a></p>
    206 </blockquote>
    207 <h4 class="mansect"><a name="tag_20_125_21" id="tag_20_125_21"></a>CHANGE HISTORY</h4>
    208 <blockquote>
    209 <p>First released in Issue 4.</p>
    210 </blockquote>
    211 <h4 class="mansect"><a name="tag_20_125_22" id="tag_20_125_22"></a>Issue 6</h4>
    212 <blockquote>
    213 <p>This utility is marked as part of the User Portability Utilities option.</p>
    214 </blockquote>
    215 <h4 class="mansect"><a name="tag_20_125_23" id="tag_20_125_23"></a>Issue 7</h4>
    216 <blockquote>
    217 <p>The <i>tput</i> utility is moved from the User Portability Utilities option to the Base. User Portability Utilities is now an
    218 option for interactive utilities.</p>
    219 </blockquote>
    220 <h4 class="mansect"><a name="tag_20_125_24" id="tag_20_125_24"></a>Issue 8</h4>
    221 <blockquote>
    222 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p>
    223 </blockquote>
    224 <div class="box"><em>End of informative text.</em></div>
    225 <hr>
    226 <p>&nbsp;</p>
    227 <a href="#top"><span class="topOfPage">return to top of page</span></a><br>
    228 <hr size="2" noshade>
    229 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br>
    230 POSIX™ is a Trademark of The IEEE.<br>
    231 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br>
    232 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
    233 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a>
    234 ]</font></center>
    235 <hr size="2" noshade>
    236 <div class="NAVHEADER">
    237 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
    238 <tr class="nav">
    239 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/touch.html" accesskey="P">&lt;&lt;&lt;
    240 Previous</a></td>
    241 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
    242 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/tr.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
    243 </tr>
    244 </table>
    245 <hr align="left" width="100%"></div>
    246 </body>
    247 </html>