Un outil pour savoir si une commande est posix - retour accueil
git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |
tabs.html (16665B)
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>tabs</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/stty.html" accesskey="P"><<< 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/tail.html" accesskey="N">Next >>></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="tabs" id="tabs"></a> <a name="tag_20_117" id="tag_20_117"></a><!-- tabs --> 28 <h4 class="mansect"><a name="tag_20_117_01" id="tag_20_117_01"></a>NAME</h4> 29 <blockquote>tabs — set terminal tabs</blockquote> 30 <h4 class="mansect"><a name="tag_20_117_02" id="tag_20_117_02"></a>SYNOPSIS</h4> 31 <blockquote class="synopsis"> 32 <p><code><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> tabs</tt> <b>[</b><tt>-</tt><i>n</i><tt>|<img src= 33 "../images/opt-start.gif" border="0">-a|-a2|-c|-c2|-c3|-f|-p|-s|-u</tt><b><img src="../images/opt-end.gif" border="0">] 34 [</b><tt>-T</tt> <i>type</i><b>]</b> <tt><br> 35 <br> 36 tabs</tt> <b>[</b><tt>-T</tt> <i>type</i><b>]</b> 37 <i>n</i><b>[[</b><i>sep</i><b>[</b><tt>+</tt><b>]</b><i>n</i><b>]</b><tt>...</tt><b>]</b> <tt><br></tt></code></p> 38 </blockquote> 39 <h4 class="mansect"><a name="tag_20_117_03" id="tag_20_117_03"></a>DESCRIPTION</h4> 40 <blockquote> 41 <p>The <i>tabs</i> utility shall display a series of characters that first clears the hardware terminal tab settings and then 42 initializes the tab stops at the specified positions <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src= 43 "../images/opt-start.gif" alt="[Option Start]" border="0"> and optionally adjusts the margin. <img src= 44 "../images/opt-end.gif" alt="[Option End]" border="0"></p> 45 <p>The phrase "tab-stop position <i>N</i>" shall be taken to mean that, from the start of a line of output, tabbing to position 46 <i>N</i> shall cause the next character output to be in the (<i>N</i>+1)th column position on that line. The maximum number of tab 47 stops allowed is terminal-dependent.</p> 48 <p>It need not be possible to implement <i>tabs</i> on certain terminals. If the terminal type obtained from the <i>TERM</i> 49 environment variable or <b>-T</b> option represents such a terminal, an appropriate diagnostic message shall be written to standard 50 error and <i>tabs</i> shall exit with a status greater than zero.</p> 51 </blockquote> 52 <h4 class="mansect"><a name="tag_20_117_04" id="tag_20_117_04"></a>OPTIONS</h4> 53 <blockquote> 54 <p>The <i>tabs</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax 55 Guidelines</i></a> , <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt= 56 "[Option Start]" border="0"> except for various extensions: the options <b>-a2</b>, <b>-c2</b>, and <b>-c3</b> are 57 multi-character. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p> 58 <p>The following options shall be supported:</p> 59 <dl compact> 60 <dd></dd> 61 <dt><b>-</b><i>n</i></dt> 62 <dd>Specify repetitive tab stops separated by a uniform number of column positions, <i>n</i>, where <i>n</i> is a single-digit 63 decimal number. The default usage of <i>tabs</i> with no arguments shall be equivalent to <i>tabs</i> -8. When <b>-0</b> is used, 64 the tab stops shall be cleared and no new ones set.</dd> 65 <dt><b>-a</b></dt> 66 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 67 1,10,16,36,72<br> 68 Assembler, applicable to some mainframes. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd> 69 <dt><b>-a2</b></dt> 70 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 71 1,10,16,40,72<br> 72 Assembler, applicable to some mainframes. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd> 73 <dt><b>-c</b></dt> 74 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 75 1,8,12,16,20,55<br> 76 COBOL, normal format. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd> 77 <dt><b>-c2</b></dt> 78 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 79 1,6,10,14,49<br> 80 COBOL, compact format (columns 1 to 6 omitted). <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd> 81 <dt><b>-c3</b></dt> 82 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 83 1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67<br> 84 COBOL compact format (columns 1 to 6 omitted), with more tabs than <b>-c2</b>. <img src="../images/opt-end.gif" alt="[Option End]" 85 border="0"></dd> 86 <dt><b>-f</b></dt> 87 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 88 1,7,11,15,19,23<br> 89 FORTRAN <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd> 90 <dt><b>-p</b></dt> 91 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 92 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61<br> 93 PL/1 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd> 94 <dt><b>-s</b></dt> 95 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 96 1,10,55<br> 97 SNOBOL <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd> 98 <dt><b>-u</b></dt> 99 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 100 1,12,20,44<br> 101 Assembler, applicable to some mainframes. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd> 102 <dt><b>-T </b><i>type</i></dt> 103 <dd>Indicate the type of terminal. If this option is not supplied and the <i>TERM</i> variable is unset or null, an unspecified 104 default terminal type shall be used. The setting of <i>type</i> shall take precedence over the value in <i>TERM .</i></dd> 105 </dl> 106 </blockquote> 107 <h4 class="mansect"><a name="tag_20_117_05" id="tag_20_117_05"></a>OPERANDS</h4> 108 <blockquote> 109 <p>The following operand shall be supported:</p> 110 <dl compact> 111 <dd></dd> 112 <dt><i>n</i><b>[[</b><i>sep</i><b>[</b>+<b>]</b><i>n</i><b>]</b>...<b>]</b></dt> 113 <dd>A single command line argument that consists of one or more tab-stop values (<i>n</i>) separated by a separator character 114 (<i>sep</i>) which is either a <comma> or a <blank> character. The application shall ensure that the tab-stop values 115 are positive decimal integers in strictly ascending order. If any tab-stop value (except the first one) is preceded by a 116 <plus-sign>, it is taken as an increment to be added to the previous value. For example, the tab lists 1,10,20,30 and <tt>"1 117 10 +10 +10"</tt> are considered to be identical.</dd> 118 </dl> 119 </blockquote> 120 <h4 class="mansect"><a name="tag_20_117_06" id="tag_20_117_06"></a>STDIN</h4> 121 <blockquote> 122 <p>Not used.</p> 123 </blockquote> 124 <h4 class="mansect"><a name="tag_20_117_07" id="tag_20_117_07"></a>INPUT FILES</h4> 125 <blockquote> 126 <p>None.</p> 127 </blockquote> 128 <h4 class="mansect"><a name="tag_20_117_08" id="tag_20_117_08"></a>ENVIRONMENT VARIABLES</h4> 129 <blockquote> 130 <p>The following environment variables shall affect the execution of <i>tabs</i>:</p> 131 <dl compact> 132 <dd></dd> 133 <dt><i>LANG</i></dt> 134 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href= 135 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization 136 variables used to determine the values of locale categories.)</dd> 137 <dt><i>LC_ALL</i></dt> 138 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd> 139 <dt><i>LC_CTYPE</i></dt> 140 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as 141 opposed to multi-byte characters in arguments).</dd> 142 <dt><i>LC_MESSAGES</i></dt> 143 <dd><br> 144 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd> 145 <dt><i>NLSPATH</i></dt> 146 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 147 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border= 148 "0"></dd> 149 <dt><i>TERM</i></dt> 150 <dd>Determine the terminal type. If this variable is unset or null, and if the <b>-T</b> option is not specified, an unspecified 151 default terminal type shall be used.</dd> 152 </dl> 153 </blockquote> 154 <h4 class="mansect"><a name="tag_20_117_09" id="tag_20_117_09"></a>ASYNCHRONOUS EVENTS</h4> 155 <blockquote> 156 <p>Default.</p> 157 </blockquote> 158 <h4 class="mansect"><a name="tag_20_117_10" id="tag_20_117_10"></a>STDOUT</h4> 159 <blockquote> 160 <p>If standard output is a terminal, the appropriate sequence to clear and set the tab stops may be written to standard output in 161 an unspecified format. If standard output is not a terminal, undefined results occur.</p> 162 </blockquote> 163 <h4 class="mansect"><a name="tag_20_117_11" id="tag_20_117_11"></a>STDERR</h4> 164 <blockquote> 165 <p>The standard error shall be used only for diagnostic messages.</p> 166 </blockquote> 167 <h4 class="mansect"><a name="tag_20_117_12" id="tag_20_117_12"></a>OUTPUT FILES</h4> 168 <blockquote> 169 <p>None.</p> 170 </blockquote> 171 <h4 class="mansect"><a name="tag_20_117_13" id="tag_20_117_13"></a>EXTENDED DESCRIPTION</h4> 172 <blockquote> 173 <p>None.</p> 174 </blockquote> 175 <h4 class="mansect"><a name="tag_20_117_14" id="tag_20_117_14"></a>EXIT STATUS</h4> 176 <blockquote> 177 <p>The following exit values shall be returned:</p> 178 <dl compact> 179 <dd></dd> 180 <dt> 0</dt> 181 <dd>Successful completion.</dd> 182 <dt>>0</dt> 183 <dd>An error occurred.</dd> 184 </dl> 185 </blockquote> 186 <h4 class="mansect"><a name="tag_20_117_15" id="tag_20_117_15"></a>CONSEQUENCES OF ERRORS</h4> 187 <blockquote> 188 <p>Default.</p> 189 </blockquote> 190 <hr> 191 <div class="box"><em>The following sections are informative.</em></div> 192 <h4 class="mansect"><a name="tag_20_117_16" id="tag_20_117_16"></a>APPLICATION USAGE</h4> 193 <blockquote> 194 <p>This utility makes use of the terminal's hardware tabs and the <a href="../utilities/stty.html"><i>stty</i></a> <i>tabs</i> 195 option.</p> 196 <p>This utility is not recommended for application use.</p> 197 <p>Some integrated display units might not have escape sequences to set tab stops, but may be set by internal system calls. On 198 these terminals, <i>tabs</i> works if standard output is directed to the terminal; if output is directed to another file, however, 199 <i>tabs</i> fails.</p> 200 </blockquote> 201 <h4 class="mansect"><a name="tag_20_117_17" id="tag_20_117_17"></a>EXAMPLES</h4> 202 <blockquote> 203 <p>None.</p> 204 </blockquote> 205 <h4 class="mansect"><a name="tag_20_117_18" id="tag_20_117_18"></a>RATIONALE</h4> 206 <blockquote> 207 <p>Consideration was given to having the <a href="../utilities/tput.html"><i>tput</i></a> utility handle all of the functions 208 described in <i>tabs</i>. However, the separate <i>tabs</i> utility was retained because it seems more intuitive to use a command 209 named <i>tabs</i> than <a href="../utilities/tput.html"><i>tput</i></a> with a new option. The <a href= 210 "../utilities/tput.html"><i>tput</i></a> utility does not support setting or clearing tabs, and no known historical version of 211 <i>tabs</i> supports the capability of setting arbitrary tab stops.</p> 212 <p>The System V <i>tabs</i> interface is very complex; the version in this volume of POSIX.1-2024 has a reduced feature list, but 213 many of the features omitted were restored as part of the XSI option even though the supported languages and coding styles are 214 primarily historical.</p> 215 <p>There was considerable sentiment for specifying only a means of resetting the tabs back to a known state—presumably the 216 "standard" of tabs every eight positions. The following features were omitted:</p> 217 <ul> 218 <li> 219 <p>Setting tab stops via the first line in a file, using --<i>file</i>. Since even the SVID has no complete explanation of this 220 feature, it is doubtful that it is in widespread use.</p> 221 </li> 222 </ul> 223 <p>In an early proposal, a <b>-t</b> <i>tablist</i> option was added for consistency with <a href= 224 "../utilities/expand.html"><i>expand</i></a>; this was later removed when inconsistencies with the historical list of tabs were 225 identified.</p> 226 <p>Consideration was given to adding a <b>-p</b> option that would output the current tab settings so that they could be saved and 227 then later restored. This was not accepted because querying the tab stops of the terminal is not a capability in historical 228 <i>terminfo</i> or <i>termcap</i> facilities and might not be supported on a wide range of terminals.</p> 229 </blockquote> 230 <h4 class="mansect"><a name="tag_20_117_19" id="tag_20_117_19"></a>FUTURE DIRECTIONS</h4> 231 <blockquote> 232 <p>None.</p> 233 </blockquote> 234 <h4 class="mansect"><a name="tag_20_117_20" id="tag_20_117_20"></a>SEE ALSO</h4> 235 <blockquote> 236 <p><a href="../utilities/expand.html#"><i>expand</i></a> , <a href="../utilities/stty.html#"><i>stty</i></a> , <a href= 237 "../utilities/tput.html#"><i>tput</i></a> , <a href="../utilities/unexpand.html#"><i>unexpand</i></a></p> 238 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href= 239 "../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a></p> 240 </blockquote> 241 <h4 class="mansect"><a name="tag_20_117_21" id="tag_20_117_21"></a>CHANGE HISTORY</h4> 242 <blockquote> 243 <p>First released in Issue 2.</p> 244 </blockquote> 245 <h4 class="mansect"><a name="tag_20_117_22" id="tag_20_117_22"></a>Issue 6</h4> 246 <blockquote> 247 <p>This utility is marked as part of the User Portability Utilities option.</p> 248 <p>The normative text is reworded to avoid use of the term "must" for application requirements.</p> 249 </blockquote> 250 <h4 class="mansect"><a name="tag_20_117_23" id="tag_20_117_23"></a>Issue 7</h4> 251 <blockquote> 252 <p>The <i>tabs</i> utility is removed from the User Portability Utilities option. User Portability Utilities is now an option for 253 interactive utilities.</p> 254 <p>SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.</p> 255 <p>The SYNOPSIS and OPERANDS sections are updated.</p> 256 </blockquote> 257 <h4 class="mansect"><a name="tag_20_117_24" id="tag_20_117_24"></a>Issue 8</h4> 258 <blockquote> 259 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p> 260 </blockquote> 261 <div class="box"><em>End of informative text.</em></div> 262 <hr> 263 <p> </p> 264 <a href="#top"><span class="topOfPage">return to top of page</span></a><br> 265 <hr size="2" noshade> 266 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br> 267 POSIX™ is a Trademark of The IEEE.<br> 268 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br> 269 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href= 270 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a> 271 ]</font></center> 272 <hr size="2" noshade> 273 <div class="NAVHEADER"> 274 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 275 <tr class="nav"> 276 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/stty.html" accesskey="P"><<< 277 Previous</a></td> 278 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 279 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/tail.html" accesskey="N">Next >>></a></td> 280 </tr> 281 </table> 282 <hr align="left" width="100%"></div> 283 </body> 284 </html>