isposix

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

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

stty.html (45830B)


      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>stty</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/strip.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/tabs.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="stty" id="stty"></a> <a name="tag_20_116" id="tag_20_116"></a><!-- stty -->
     28 <h4 class="mansect"><a name="tag_20_116_01" id="tag_20_116_01"></a>NAME</h4>
     29 <blockquote>stty — set the options for a terminal</blockquote>
     30 <h4 class="mansect"><a name="tag_20_116_02" id="tag_20_116_02"></a>SYNOPSIS</h4>
     31 <blockquote class="synopsis">
     32 <p><code><tt>stty</tt> <b>[</b><tt>-a|-g</tt><b>]</b> <tt><br>
     33 <br>
     34 stty</tt> <i>operand</i><tt>...<br></tt></code></p>
     35 </blockquote>
     36 <h4 class="mansect"><a name="tag_20_116_03" id="tag_20_116_03"></a>DESCRIPTION</h4>
     37 <blockquote>
     38 <p>The <i>stty</i> utility shall set or report on terminal I/O characteristics for the device that is its standard input. Without
     39 options or operands specified, it shall report the settings of certain characteristics, usually those that differ from
     40 implementation-defined defaults. Otherwise, it shall modify the terminal state according to the specified operands. Detailed
     41 information about the modes listed in the first five groups below are described in XBD <a href=
     42 "../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> . Operands in the Combination Modes group (see
     43 <a href="#tag_20_116_05_06">Combination Modes</a> ) are implemented using operands in the previous groups. Some combinations of
     44 operands are mutually-exclusive on some terminal types; the results of using such combinations are unspecified.</p>
     45 <p>Typical implementations of this utility require a communications line configured to use the <b>termios</b> interface defined in
     46 the System Interfaces volume of POSIX.1-2024. On systems where none of these lines are available, and on lines not currently
     47 configured to support the <b>termios</b> interface, some of the operands need not affect terminal characteristics.</p>
     48 </blockquote>
     49 <h4 class="mansect"><a name="tag_20_116_04" id="tag_20_116_04"></a>OPTIONS</h4>
     50 <blockquote>
     51 <p>The <i>stty</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax
     52 Guidelines</i></a> .</p>
     53 <p>The following options shall be supported:</p>
     54 <dl compact>
     55 <dd></dd>
     56 <dt><b>-a</b></dt>
     57 <dd>Write to standard output all the current settings for the terminal.</dd>
     58 <dt><b>-g</b></dt>
     59 <dd>Write to standard output all the current settings, optionally excluding the terminal window size, in an unspecified form that,
     60 when stripped of trailing &lt;newline&gt; characters, and used as the one and only argument to another invocation of the
     61 <i>stty</i> utility on the same system, attempts to apply those settings to the terminal. The form used shall not contain any
     62 sequence that would form an Informational Query, and shall consist of one line of text consisting of only printable characters from
     63 the portable character set, excluding white-space characters (other than the terminating &lt;newline&gt;) and these characters that
     64 could be altered by pathname expansion performed by the shell: <tt>'*'</tt>, <tt>'?'</tt>, and <tt>'['</tt>.</dd>
     65 </dl>
     66 </blockquote>
     67 <h4 class="mansect"><a name="tag_20_116_05" id="tag_20_116_05"></a>OPERANDS</h4>
     68 <blockquote>
     69 <p>The following operands shall be supported.</p>
     70 <h5><a name="tag_20_116_05_01" id="tag_20_116_05_01"></a>Control Modes</h5>
     71 <dl compact>
     72 <dd></dd>
     73 <dt><b>parenb&nbsp;</b>(<b>-parenb</b>)</dt>
     74 <dd>Enable (disable) parity generation and detection. This shall have the effect of setting (not setting) PARENB in the
     75 <b>termios</b> <i>c_cflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal
     76 Interface</i></a> .</dd>
     77 <dt><b>parodd&nbsp;</b>(<b>-parodd</b>)</dt>
     78 <dd><br>
     79 Select odd (even) parity. This shall have the effect of setting (not setting) PARODD in the <b>termios</b> <i>c_cflag</i> field, as
     80 defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
     81 <dt><b>cs5&nbsp;cs6&nbsp;cs7&nbsp;cs8</b></dt>
     82 <dd>Select character size, if possible. This shall have the effect of setting CS5, CS6, CS7, and CS8, respectively, in the
     83 <b>termios</b> <i>c_cflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal
     84 Interface</i></a> .</dd>
     85 <dt><i>number</i></dt>
     86 <dd>Set terminal baud rate to the number given, if possible. If the baud rate is set to zero, the modem control lines shall no
     87 longer be asserted. This shall have the effect of setting the input and output <b>termios</b> baud rate values as defined in XBD
     88 <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
     89 <dt><b>ispeed&nbsp;</b><i>number</i></dt>
     90 <dd>Set terminal input baud rate to the number given, if possible. If the input baud rate is set to zero, the input baud rate shall
     91 be specified by the value of the output baud rate. This shall have the effect of setting the input <b>termios</b> baud rate value
     92 as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
     93 <dt><b>ospeed&nbsp;</b><i>number</i></dt>
     94 <dd>Set terminal output baud rate to the number given, if possible. If the output baud rate is set to zero, the modem control lines
     95 shall no longer be asserted. This shall have the effect of setting the output <b>termios</b> baud rate value as defined in XBD
     96 <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
     97 <dt><b>hupcl&nbsp;</b>(<b>-hupcl</b>)</dt>
     98 <dd>Stop asserting modem control lines (do not stop asserting modem control lines) on last close. This shall have the effect of
     99 setting (not setting) HUPCL in the <b>termios</b> <i>c_cflag</i> field, as defined in XBD <a href=
    100 "../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
    101 <dt><b>hup&nbsp;</b>(<b>-hup</b>)</dt>
    102 <dd>Equivalent to <b>hupcl</b>(<b>-hupcl</b>).</dd>
    103 <dt><b>cstopb&nbsp;</b>(<b>-cstopb</b>)</dt>
    104 <dd>Use two (one) stop bits per character. This shall have the effect of setting (not setting) CSTOPB in the <b>termios</b>
    105 <i>c_cflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    106 .</dd>
    107 <dt><b>cread&nbsp;</b>(<b>-cread</b>)</dt>
    108 <dd>Enable (disable) the receiver. This shall have the effect of setting (not setting) CREAD in the <b>termios</b> <i>c_cflag</i>
    109 field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
    110 <dt><b>clocal&nbsp;</b>(<b>-clocal</b>)</dt>
    111 <dd>Assume a line without (with) modem control. This shall have the effect of setting (not setting) CLOCAL in the <b>termios</b>
    112 <i>c_cflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    113 .</dd>
    114 </dl>
    115 <p>It is unspecified whether <i>stty</i> shall report an error if an attempt to set a Control Mode fails.</p>
    116 <h5><a name="tag_20_116_05_02" id="tag_20_116_05_02"></a>Input Modes</h5>
    117 <dl compact>
    118 <dd></dd>
    119 <dt><b>ignbrk&nbsp;</b>(<b>-ignbrk</b>)</dt>
    120 <dd>Ignore (do not ignore) break on input. This shall have the effect of setting (not setting) IGNBRK in the <b>termios</b>
    121 <i>c_iflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    122 .</dd>
    123 <dt><b>brkint&nbsp;</b>(<b>-brkint</b>)</dt>
    124 <dd>Signal (do not signal) INTR on break. This shall have the effect of setting (not setting) BRKINT in the <b>termios</b>
    125 <i>c_iflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    126 .</dd>
    127 <dt><b>ignpar&nbsp;</b>(<b>-ignpar</b>)</dt>
    128 <dd>Ignore (do not ignore) bytes with parity errors. This shall have the effect of setting (not setting) IGNPAR in the
    129 <b>termios</b> <i>c_iflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal
    130 Interface</i></a> .</dd>
    131 <dt><b>parmrk&nbsp;</b>(<b>-parmrk</b>)</dt>
    132 <dd><br>
    133 Mark (do not mark) parity errors. This shall have the effect of setting (not setting) PARMRK in the <b>termios</b> <i>c_iflag</i>
    134 field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
    135 <dt><b>inpck&nbsp;</b>(<b>-inpck</b>)</dt>
    136 <dd>Enable (disable) input parity checking. This shall have the effect of setting (not setting) INPCK in the <b>termios</b>
    137 <i>c_iflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    138 .</dd>
    139 <dt><b>istrip&nbsp;</b>(<b>-istrip</b>)</dt>
    140 <dd>Strip (do not strip) input characters to seven bits. This shall have the effect of setting (not setting) ISTRIP in the
    141 <b>termios</b> <i>c_iflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal
    142 Interface</i></a> .</dd>
    143 <dt><b>inlcr&nbsp;</b>(<b>-inlcr</b>)</dt>
    144 <dd>Map (do not map) NL to CR on input. This shall have the effect of setting (not setting) INLCR in the <b>termios</b>
    145 <i>c_iflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    146 .</dd>
    147 <dt><b>igncr&nbsp;(-igncr)</b></dt>
    148 <dd>Ignore (do not ignore) CR on input. This shall have the effect of setting (not setting) IGNCR in the <b>termios</b>
    149 <i>c_iflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    150 .</dd>
    151 <dt><b>icrnl&nbsp;</b>(<b>-icrnl</b>)</dt>
    152 <dd>Map (do not map) CR to NL on input. This shall have the effect of setting (not setting) ICRNL in the <b>termios</b>
    153 <i>c_iflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    154 .</dd>
    155 <dt><b>ixon&nbsp;</b>(<b>-ixon</b>)</dt>
    156 <dd>Enable (disable) START/STOP output control. Output from the system is stopped when the system receives STOP and started when
    157 the system receives START. This shall have the effect of setting (not setting) IXON in the <b>termios</b> <i>c_iflag</i> field, as
    158 defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
    159 <dt><b>ixany&nbsp;</b>(<b>-ixany</b>)</dt>
    160 <dd>Allow any character to restart output. This shall have the effect of setting (not setting) IXANY in the <b>termios</b>
    161 <i>c_iflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    162 .</dd>
    163 <dt><b>ixoff&nbsp;</b>(<b>-ixoff</b>)</dt>
    164 <dd>Request that the system send (not send) STOP characters when the input queue is nearly full and START characters to resume data
    165 transmission. This shall have the effect of setting (not setting) IXOFF in the <b>termios</b> <i>c_iflag</i> field, as defined in
    166 XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
    167 </dl>
    168 <h5><a name="tag_20_116_05_03" id="tag_20_116_05_03"></a>Output Modes</h5>
    169 <dl compact>
    170 <dd></dd>
    171 <dt><b>opost&nbsp;</b>(<b>-opost</b>)</dt>
    172 <dd>Post-process output (do not post-process output; ignore all other output modes). This shall have the effect of setting (not
    173 setting) OPOST in the <b>termios</b> <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11.
    174 General Terminal Interface</i></a> .</dd>
    175 <dt><b>onlcr&nbsp;</b>(<b>-onlcr</b>)</dt>
    176 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    177 Map (do not map) NL to CR-NL on output. This shall have the effect of setting (not setting) ONLCR in the <b>termios</b>
    178 <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .
    179 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    180 <dt><b>ocrnl&nbsp;</b>(<b>-ocrnl</b>)</dt>
    181 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    182 Map (do not map) CR to NL on output. This shall have the effect of setting (not setting) OCRNL in the <b>termios</b> <i>c_oflag</i>
    183 field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> . <img src=
    184 "../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    185 <dt><b>onocr&nbsp;</b>(<b>-onocr</b>)</dt>
    186 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    187 Do not (do) output CR at column zero. This shall have the effect of setting (not setting) ONOCR in the <b>termios</b>
    188 <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .
    189 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    190 <dt><b>onlret&nbsp;</b>(<b>-onlret</b>)</dt>
    191 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    192 The terminal newline key performs (does not perform) the CR function. This shall have the effect of setting (not setting) ONLRET in
    193 the <b>termios</b> <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal
    194 Interface</i></a> . <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    195 <dt><b>ofill&nbsp;</b>(<b>-ofill</b>)</dt>
    196 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    197 Use fill characters (use timing) for delays. This shall have the effect of setting (not setting) OFILL in the <b>termios</b>
    198 <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .
    199 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    200 <dt><b>ofdel&nbsp;</b>(<b>-ofdel</b>)</dt>
    201 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    202 Fill characters are DELs (NULs). This shall have the effect of setting (not setting) OFDEL in the <b>termios</b> <i>c_oflag</i>
    203 field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> . <img src=
    204 "../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    205 <dt><b>cr0&nbsp;cr1&nbsp;cr2&nbsp;cr3</b></dt>
    206 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    207 Select the style of delay for CRs. This shall have the effect of setting CRDLY to CR0, CR1, CR2, or CR3, respectively, in the
    208 <b>termios</b> <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal
    209 Interface</i></a> . <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    210 <dt><b>nl0&nbsp;nl1</b></dt>
    211 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    212 Select the style of delay for NL. This shall have the effect of setting NLDLY to NL0 or NL1, respectively, in the <b>termios</b>
    213 <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .
    214 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    215 <dt><b>tab0&nbsp;tab1&nbsp;tab2&nbsp;tab3</b></dt>
    216 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border=
    217 "0"><br>
    218 Select the style of delay for horizontal tabs. This shall have the effect of setting TABDLY to TAB0, TAB1, TAB2, or TAB3,
    219 respectively, in the <b>termios</b> <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11.
    220 General Terminal Interface</i></a> . Note that TAB3 has the effect of expanding &lt;tab&gt; characters to &lt;space&gt; characters.
    221 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    222 <dt><b>tabs&nbsp;</b>(<b>-tabs</b>)</dt>
    223 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    224 Synonym for <b>tab0</b> (<b>tab3</b>). <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    225 <dt><b>bs0&nbsp;bs1</b></dt>
    226 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    227 Select the style of delay for &lt;backspace&gt; characters. This shall have the effect of setting BSDLY to BS0 or BS1,
    228 respectively, in the <b>termios</b> <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11.
    229 General Terminal Interface</i></a> . <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    230 <dt><b>ff0&nbsp;ff1</b></dt>
    231 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    232 Select the style of delay for &lt;form-feed&gt; characters. This shall have the effect of setting FFDLY to FF0 or FF1,
    233 respectively, in the <b>termios</b> <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11.
    234 General Terminal Interface</i></a> . <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    235 <dt><b>vt0&nbsp;vt1</b></dt>
    236 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    237 Select the style of delay for &lt;vertical-tab&gt; characters. This shall have the effect of setting VTDLY to VT0 or VT1,
    238 respectively, in the <b>termios</b> <i>c_oflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11.
    239 General Terminal Interface</i></a> . <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    240 </dl>
    241 <h5><a name="tag_20_116_05_04" id="tag_20_116_05_04"></a>Local Modes</h5>
    242 <dl compact>
    243 <dd></dd>
    244 <dt><b>isig&nbsp;</b>(<b>-isig</b>)</dt>
    245 <dd>Enable (disable) the checking of characters against the special control characters INTR, QUIT, and SUSP. This shall have the
    246 effect of setting (not setting) ISIG in the <b>termios</b> <i>c_lflag</i> field, as defined in XBD <a href=
    247 "../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
    248 <dt><b>icanon&nbsp;</b>(<b>-icanon</b>)</dt>
    249 <dd>Enable (disable) canonical input (ERASE and KILL processing). This shall have the effect of setting (not setting) ICANON in the
    250 <b>termios</b> <i>c_lflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal
    251 Interface</i></a> .</dd>
    252 <dt><b>iexten&nbsp;</b>(<b>-iexten</b>)</dt>
    253 <dd>Enable (disable) any implementation-defined special control characters not currently controlled by <b>icanon</b>, <b>isig</b>,
    254 <b>ixon</b>, or <b>ixoff</b>. This shall have the effect of setting (not setting) IEXTEN in the <b>termios</b> <i>c_lflag</i>
    255 field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
    256 <dt><b>echo&nbsp;</b>(<b>-echo</b>)</dt>
    257 <dd>Echo back (do not echo back) every character typed. This shall have the effect of setting (not setting) ECHO in the
    258 <b>termios</b> <i>c_lflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal
    259 Interface</i></a> .</dd>
    260 <dt><b>echoe&nbsp;</b>(<b>-echoe</b>)</dt>
    261 <dd>The ERASE character visually erases (does not erase) the last character in the current line from the display, if possible. This
    262 shall have the effect of setting (not setting) ECHOE in the <b>termios</b> <i>c_lflag</i> field, as defined in XBD <a href=
    263 "../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> .</dd>
    264 <dt><b>echok&nbsp;</b>(<b>-echok</b>)</dt>
    265 <dd>Echo (do not echo) NL after KILL character. This shall have the effect of setting (not setting) ECHOK in the <b>termios</b>
    266 <i>c_lflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    267 .</dd>
    268 <dt><b>echonl&nbsp;</b>(<b>-echonl</b>)</dt>
    269 <dd>Echo (do not echo) NL, even if <b>echo</b> is disabled. This shall have the effect of setting (not setting) ECHONL in the
    270 <b>termios</b> <i>c_lflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal
    271 Interface</i></a> .</dd>
    272 <dt><b>noflsh&nbsp;</b>(<b>-noflsh</b>)</dt>
    273 <dd>Disable (enable) flush after INTR, QUIT, SUSP. This shall have the effect of setting (not setting) NOFLSH in the <b>termios</b>
    274 <i>c_lflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    275 .</dd>
    276 <dt><b>tostop&nbsp;</b>(<b>-tostop</b>)</dt>
    277 <dd>Send SIGTTOU for background output. This shall have the effect of setting (not setting) TOSTOP in the <b>termios</b>
    278 <i>c_lflag</i> field, as defined in XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a>
    279 .</dd>
    280 </dl>
    281 <h5><a name="tag_20_116_05_05" id="tag_20_116_05_05"></a>Special Control Character Assignments</h5>
    282 <dl compact>
    283 <dd></dd>
    284 <dt>&lt;<i>control</i>&gt;-<i>character&nbsp;string</i></dt>
    285 <dd><br>
    286 Set &lt;<i>control</i>&gt;-<i>character</i> to <i>string</i>. If &lt;<i>control</i>&gt;-<i>character</i> is one of the character
    287 sequences in the first column of the following table, the corresponding XBD <a href="../basedefs/V1_chap11.html#tag_11"><i>11.
    288 General Terminal Interface</i></a> control character from the second column shall be recognized. This has the effect of setting the
    289 corresponding element of the <b>termios</b> <i>c_cc</i> array (see XBD <a href="../basedefs/V1_chap14.html#tag_14"><i>14.
    290 Headers</i></a> , <a href="../basedefs/termios.h.html"><i>&lt;termios.h&gt;</i></a>).<br>
    291 <p class="caption">Table: Control Character Names in <i>stty</i></p>
    292 <center>
    293 <table border="1" cellpadding="3" align="center">
    294 <tr valign="top">
    295 <th align="center">
    296 <p class="tent"><b>Control Character</b></p>
    297 </th>
    298 <th align="center">
    299 <p class="tent"><b>c_cc Subscript</b></p>
    300 </th>
    301 <th align="center">
    302 <p class="tent"><b>Description</b></p>
    303 </th>
    304 </tr>
    305 <tr valign="top">
    306 <td align="left">
    307 <p class="tent"><b>eof</b></p>
    308 </td>
    309 <td align="left">
    310 <p class="tent">VEOF</p>
    311 </td>
    312 <td align="left">
    313 <p class="tent">EOF character</p>
    314 </td>
    315 </tr>
    316 <tr valign="top">
    317 <td align="left">
    318 <p class="tent"><b>eol</b></p>
    319 </td>
    320 <td align="left">
    321 <p class="tent">VEOL</p>
    322 </td>
    323 <td align="left">
    324 <p class="tent">EOL character</p>
    325 </td>
    326 </tr>
    327 <tr valign="top">
    328 <td align="left">
    329 <p class="tent"><b>erase</b></p>
    330 </td>
    331 <td align="left">
    332 <p class="tent">VERASE</p>
    333 </td>
    334 <td align="left">
    335 <p class="tent">ERASE character</p>
    336 </td>
    337 </tr>
    338 <tr valign="top">
    339 <td align="left">
    340 <p class="tent"><b>intr</b></p>
    341 </td>
    342 <td align="left">
    343 <p class="tent">VINTR</p>
    344 </td>
    345 <td align="left">
    346 <p class="tent">INTR character</p>
    347 </td>
    348 </tr>
    349 <tr valign="top">
    350 <td align="left">
    351 <p class="tent"><b>kill</b></p>
    352 </td>
    353 <td align="left">
    354 <p class="tent">VKILL</p>
    355 </td>
    356 <td align="left">
    357 <p class="tent">KILL character</p>
    358 </td>
    359 </tr>
    360 <tr valign="top">
    361 <td align="left">
    362 <p class="tent"><b>quit</b></p>
    363 </td>
    364 <td align="left">
    365 <p class="tent">VQUIT</p>
    366 </td>
    367 <td align="left">
    368 <p class="tent">QUIT character</p>
    369 </td>
    370 </tr>
    371 <tr valign="top">
    372 <td align="left">
    373 <p class="tent"><b>susp</b></p>
    374 </td>
    375 <td align="left">
    376 <p class="tent">VSUSP</p>
    377 </td>
    378 <td align="left">
    379 <p class="tent">SUSP character</p>
    380 </td>
    381 </tr>
    382 <tr valign="top">
    383 <td align="left">
    384 <p class="tent"><b>start</b></p>
    385 </td>
    386 <td align="left">
    387 <p class="tent">VSTART</p>
    388 </td>
    389 <td align="left">
    390 <p class="tent">START character</p>
    391 </td>
    392 </tr>
    393 <tr valign="top">
    394 <td align="left">
    395 <p class="tent"><b>stop</b></p>
    396 </td>
    397 <td align="left">
    398 <p class="tent">VSTOP</p>
    399 </td>
    400 <td align="left">
    401 <p class="tent">STOP character</p>
    402 </td>
    403 </tr>
    404 </table>
    405 </center>
    406 <p class="tent">If <i>string</i> is a single character, the control character shall be set to that character. If <i>string</i> is
    407 the two-character sequence <tt>"^-"</tt> or the string <i>undef</i>, the control character shall be set to _POSIX_VDISABLE , if it
    408 is in effect for the device; if _POSIX_VDISABLE is not in effect for the device, it shall be treated as an error. In the POSIX
    409 locale, if <i>string</i> is a two-character sequence beginning with &lt;circumflex&gt; (<tt>'^'</tt>), and the second character is
    410 one of those listed in the <tt>"^c"</tt> column of the following table, the control character shall be set to the corresponding
    411 character value in the Value column of the table.<br></p>
    412 <p class="caption">Table: Circumflex Control Characters in <i>stty</i></p>
    413 <center>
    414 <table border="1" cellpadding="3" align="center">
    415 <tr valign="top">
    416 <th align="center">
    417 <p class="tent"><b>^c</b></p>
    418 </th>
    419 <th align="center">
    420 <p class="tent"><b>Value</b></p>
    421 </th>
    422 <th align="center">
    423 <p class="tent"><b>^c</b></p>
    424 </th>
    425 <th align="center">
    426 <p class="tent"><b>Value</b></p>
    427 </th>
    428 <th align="center">
    429 <p class="tent"><b>^c</b></p>
    430 </th>
    431 <th align="center">
    432 <p class="tent"><b>Value</b></p>
    433 </th>
    434 </tr>
    435 <tr valign="top">
    436 <td align="left">
    437 <p class="tent">a, A</p>
    438 </td>
    439 <td align="left">
    440 <p class="tent">&lt;SOH&gt;</p>
    441 </td>
    442 <td align="left">
    443 <p class="tent">l, L</p>
    444 </td>
    445 <td align="left">
    446 <p class="tent">&lt;FF&gt;</p>
    447 </td>
    448 <td align="left">
    449 <p class="tent">w, W</p>
    450 </td>
    451 <td align="left">
    452 <p class="tent">&lt;ETB&gt;</p>
    453 </td>
    454 </tr>
    455 <tr valign="top">
    456 <td align="left">
    457 <p class="tent">b, B</p>
    458 </td>
    459 <td align="left">
    460 <p class="tent">&lt;STX&gt;</p>
    461 </td>
    462 <td align="left">
    463 <p class="tent">m, M</p>
    464 </td>
    465 <td align="left">
    466 <p class="tent">&lt;CR&gt;</p>
    467 </td>
    468 <td align="left">
    469 <p class="tent">x, X</p>
    470 </td>
    471 <td align="left">
    472 <p class="tent">&lt;CAN&gt;</p>
    473 </td>
    474 </tr>
    475 <tr valign="top">
    476 <td align="left">
    477 <p class="tent">c, C</p>
    478 </td>
    479 <td align="left">
    480 <p class="tent">&lt;ETX&gt;</p>
    481 </td>
    482 <td align="left">
    483 <p class="tent">n, N</p>
    484 </td>
    485 <td align="left">
    486 <p class="tent">&lt;SO&gt;</p>
    487 </td>
    488 <td align="left">
    489 <p class="tent">y, Y</p>
    490 </td>
    491 <td align="left">
    492 <p class="tent">&lt;EM&gt;</p>
    493 </td>
    494 </tr>
    495 <tr valign="top">
    496 <td align="left">
    497 <p class="tent">d, D</p>
    498 </td>
    499 <td align="left">
    500 <p class="tent">&lt;EOT&gt;</p>
    501 </td>
    502 <td align="left">
    503 <p class="tent">o, O</p>
    504 </td>
    505 <td align="left">
    506 <p class="tent">&lt;SI&gt;</p>
    507 </td>
    508 <td align="left">
    509 <p class="tent">z, Z</p>
    510 </td>
    511 <td align="left">
    512 <p class="tent">&lt;SUB&gt;</p>
    513 </td>
    514 </tr>
    515 <tr valign="top">
    516 <td align="left">
    517 <p class="tent">e, E</p>
    518 </td>
    519 <td align="left">
    520 <p class="tent">&lt;ENQ&gt;</p>
    521 </td>
    522 <td align="left">
    523 <p class="tent">p, P</p>
    524 </td>
    525 <td align="left">
    526 <p class="tent">&lt;DLE&gt;</p>
    527 </td>
    528 <td align="left">
    529 <p class="tent">[</p>
    530 </td>
    531 <td align="left">
    532 <p class="tent">&lt;ESC&gt;</p>
    533 </td>
    534 </tr>
    535 <tr valign="top">
    536 <td align="left">
    537 <p class="tent">f, F</p>
    538 </td>
    539 <td align="left">
    540 <p class="tent">&lt;ACK&gt;</p>
    541 </td>
    542 <td align="left">
    543 <p class="tent">q, Q</p>
    544 </td>
    545 <td align="left">
    546 <p class="tent">&lt;DC1&gt;</p>
    547 </td>
    548 <td align="left">
    549 <p class="tent">\</p>
    550 </td>
    551 <td align="left">
    552 <p class="tent">&lt;FS&gt;</p>
    553 </td>
    554 </tr>
    555 <tr valign="top">
    556 <td align="left">
    557 <p class="tent">g, G</p>
    558 </td>
    559 <td align="left">
    560 <p class="tent">&lt;BEL&gt;</p>
    561 </td>
    562 <td align="left">
    563 <p class="tent">r, R</p>
    564 </td>
    565 <td align="left">
    566 <p class="tent">&lt;DC2&gt;</p>
    567 </td>
    568 <td align="left">
    569 <p class="tent">]</p>
    570 </td>
    571 <td align="left">
    572 <p class="tent">&lt;GS&gt;</p>
    573 </td>
    574 </tr>
    575 <tr valign="top">
    576 <td align="left">
    577 <p class="tent">h, H</p>
    578 </td>
    579 <td align="left">
    580 <p class="tent">&lt;BS&gt;</p>
    581 </td>
    582 <td align="left">
    583 <p class="tent">s, S</p>
    584 </td>
    585 <td align="left">
    586 <p class="tent">&lt;DC3&gt;</p>
    587 </td>
    588 <td align="left">
    589 <p class="tent">^</p>
    590 </td>
    591 <td align="left">
    592 <p class="tent">&lt;RS&gt;</p>
    593 </td>
    594 </tr>
    595 <tr valign="top">
    596 <td align="left">
    597 <p class="tent">i, I</p>
    598 </td>
    599 <td align="left">
    600 <p class="tent">&lt;HT&gt;</p>
    601 </td>
    602 <td align="left">
    603 <p class="tent">t, T</p>
    604 </td>
    605 <td align="left">
    606 <p class="tent">&lt;DC4&gt;</p>
    607 </td>
    608 <td align="left">
    609 <p class="tent">_</p>
    610 </td>
    611 <td align="left">
    612 <p class="tent">&lt;US&gt;</p>
    613 </td>
    614 </tr>
    615 <tr valign="top">
    616 <td align="left">
    617 <p class="tent">j, J</p>
    618 </td>
    619 <td align="left">
    620 <p class="tent">&lt;LF&gt;</p>
    621 </td>
    622 <td align="left">
    623 <p class="tent">u, U</p>
    624 </td>
    625 <td align="left">
    626 <p class="tent">&lt;NAK&gt;</p>
    627 </td>
    628 <td align="left">
    629 <p class="tent">?</p>
    630 </td>
    631 <td align="left">
    632 <p class="tent">&lt;DEL&gt;</p>
    633 </td>
    634 </tr>
    635 <tr valign="top">
    636 <td align="left">
    637 <p class="tent">k, K</p>
    638 </td>
    639 <td align="left">
    640 <p class="tent">&lt;VT&gt;</p>
    641 </td>
    642 <td align="left">
    643 <p class="tent">v, V</p>
    644 </td>
    645 <td align="left">
    646 <p class="tent">&lt;SYN&gt;</p>
    647 </td>
    648 <td align="left">
    649 <p class="tent">&nbsp;</p>
    650 </td>
    651 <td align="left">
    652 <p class="tent">&nbsp;</p>
    653 </td>
    654 </tr>
    655 </table>
    656 </center>
    657 </dd>
    658 <dt><b>min&nbsp;</b><i>number</i></dt>
    659 <dd><br>
    660 Set the value of MIN to <i>number</i>. MIN is used in non-canonical mode input processing (<b>-icanon</b>).</dd>
    661 <dt><b>time&nbsp;</b><i>number</i></dt>
    662 <dd><br>
    663 Set the value of TIME to <i>number</i>. TIME is used in non-canonical mode input processing (<b>-icanon</b>).</dd>
    664 </dl>
    665 <h5><a name="tag_20_116_05_06" id="tag_20_116_05_06"></a>Combination Modes</h5>
    666 <dl compact>
    667 <dd></dd>
    668 <dt><i>saved&nbsp;settings</i></dt>
    669 <dd><br>
    670 Set the current terminal characteristics to the saved settings produced by the <b>-g</b> option.</dd>
    671 <dt><b>evenp</b>&nbsp;or&nbsp;<b>parity</b></dt>
    672 <dd><br>
    673 Enable <b>parenb</b> and <b>cs7</b>; disable <b>parodd</b>.</dd>
    674 <dt><b>oddp</b></dt>
    675 <dd><br>
    676 Enable <b>parenb</b>, <b>cs7</b>, and <b>parodd</b>.</dd>
    677 <dt><b>-parity</b>, <b>-evenp</b>, or <b>-oddp</b></dt>
    678 <dd><br>
    679 Disable <b>parenb</b>, and set <b>cs8</b>.</dd>
    680 <dt><b>raw&nbsp;</b>(<b>-raw</b>&nbsp;or&nbsp;<b>cooked</b>)</dt>
    681 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border=
    682 "0"><br>
    683 Enable (disable) raw input and output. Raw mode shall be equivalent to setting:
    684 <pre>
    685 <tt>stty cs8 erase ^- kill ^- intr ^- \
    686     quit ^- eof ^- eol ^- -post -inpck
    687 </tt></pre>
    688 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    689 <dt><b>nl&nbsp;</b>(<b>-nl</b>)</dt>
    690 <dd><br>
    691 Disable (enable) <b>icrnl</b>. In addition, <b>-nl</b> unsets <b>inlcr</b> and <b>igncr</b>.</dd>
    692 <dt><b>ek</b></dt>
    693 <dd>Reset ERASE and KILL characters back to system defaults.</dd>
    694 <dt><b>sane</b></dt>
    695 <dd><br>
    696 Reset all modes to some reasonable, unspecified, values.</dd>
    697 </dl>
    698 <h5><a name="tag_20_116_05_07" id="tag_20_116_05_07"></a>Terminal Window Size</h5>
    699 <dl compact>
    700 <dd></dd>
    701 <dt><b>rows&nbsp;</b><i>number</i></dt>
    702 <dd><br>
    703 Set the number of rows in the terminal window size to the number given.</dd>
    704 <dt><b>cols&nbsp;</b><i>number</i></dt>
    705 <dd><br>
    706 Set the number of columns in the terminal window size to the number given.</dd>
    707 </dl>
    708 <p class="tent">The terminal window size shall be updated as if the <i>stty</i> utility calls <a href=
    709 "../functions/tcgetwinsize.html"><i>tcgetwinsize</i>()</a> to populate a <b>winsize</b> structure, updates one or both of the
    710 <i>ws_row</i> and <i>ws_col</i> members according to the <b>rows</b> and <b>cols</b> numbers specified, and then calls <a href=
    711 "../functions/tcsetwinsize.html"><i>tcsetwinsize</i>()</a> with the updated structure (see XSH <a href=
    712 "../functions/tcgetwinsize.html#"><i>tcgetwinsize</i></a> and <a href="../functions/tcsetwinsize.html#"><i>tcsetwinsize</i></a>
    713 ).</p>
    714 <h5><a name="tag_20_116_05_08" id="tag_20_116_05_08"></a>Informational Queries</h5>
    715 <dl compact>
    716 <dd></dd>
    717 <dt><b>size</b></dt>
    718 <dd><br>
    719 Write the current terminal window size to standard output.</dd>
    720 </dl>
    721 </blockquote>
    722 <h4 class="mansect"><a name="tag_20_116_06" id="tag_20_116_06"></a>STDIN</h4>
    723 <blockquote>
    724 <p>Although no input is read from standard input, standard input shall be used to get the current terminal I/O characteristics and
    725 to set new terminal I/O characteristics.</p>
    726 </blockquote>
    727 <h4 class="mansect"><a name="tag_20_116_07" id="tag_20_116_07"></a>INPUT FILES</h4>
    728 <blockquote>
    729 <p>None.</p>
    730 </blockquote>
    731 <h4 class="mansect"><a name="tag_20_116_08" id="tag_20_116_08"></a>ENVIRONMENT VARIABLES</h4>
    732 <blockquote>
    733 <p>The following environment variables shall affect the execution of <i>stty</i>:</p>
    734 <dl compact>
    735 <dd></dd>
    736 <dt><i>LANG</i></dt>
    737 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href=
    738 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization
    739 variables used to determine the values of locale categories.)</dd>
    740 <dt><i>LC_ALL</i></dt>
    741 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
    742 <dt><i>LC_CTYPE</i></dt>
    743 <dd>This variable determines the locale for the interpretation of sequences of bytes of text data as characters (for example,
    744 single-byte as opposed to multi-byte characters in arguments) and which characters are in the class <b>print</b>.</dd>
    745 <dt><i>LC_MESSAGES</i></dt>
    746 <dd><br>
    747 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd>
    748 <dt><i>NLSPATH</i></dt>
    749 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    750 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border=
    751 "0"></dd>
    752 </dl>
    753 </blockquote>
    754 <h4 class="mansect"><a name="tag_20_116_09" id="tag_20_116_09"></a>ASYNCHRONOUS EVENTS</h4>
    755 <blockquote>
    756 <p>Default.</p>
    757 </blockquote>
    758 <h4 class="mansect"><a name="tag_20_116_10" id="tag_20_116_10"></a>STDOUT</h4>
    759 <blockquote>
    760 <p>If operands are specified and they do not include any Informational Queries, no output shall be produced.</p>
    761 <p class="tent">If the <b>size</b> operand is specified, <i>stty</i> shall write to standard output the terminal window size as
    762 follows:</p>
    763 <pre>
    764 <tt>"%1dΔ%1d\n", &lt;</tt><i>rows</i><tt>&gt;, &lt;</tt><i>columns</i><tt>&gt;
    765 </tt></pre>
    766 where &lt;<i>rows</i>&gt; and &lt;<i>columns</i>&gt; are the number of rows and columns in the terminal window size, respectively.
    767 <p class="tent">If the <b>-g</b> option is specified, <i>stty</i> shall write to standard output the current settings in a form
    768 that can be used as arguments to another instance of <i>stty</i> on the same system.</p>
    769 <p class="tent">If the <b>-a</b> option is specified, all of the information as described in the OPERANDS section shall be written
    770 to standard output. Unless otherwise specified, this information shall be written as &lt;space&gt;-separated tokens in an
    771 unspecified format, on one or more lines, with an unspecified number of tokens per line. Additional information may be written.</p>
    772 <p class="tent">If no options or operands are specified, an unspecified subset of the information written for the <b>-a</b> option
    773 shall be written.</p>
    774 <p class="tent">If speed information is written as part of the default output, or if the <b>-a</b> option is specified and if the
    775 terminal input speed and output speed are the same, the speed information shall be written as follows:</p>
    776 <pre>
    777 <tt>"speed %d baud;", &lt;</tt><i>speed</i><tt>&gt;
    778 </tt></pre>
    779 <p class="tent">Otherwise, speeds shall be written as:</p>
    780 <pre>
    781 <tt>"ispeed %d baud; ospeed %d baud;", &lt;</tt><i>ispeed</i><tt>&gt;, &lt;</tt><i>ospeed</i><tt>&gt;
    782 </tt></pre>
    783 <p class="tent">In locales other than the POSIX locale, the word <b>baud</b> may be changed to something more appropriate in those
    784 locales.</p>
    785 <p class="tent">If control characters are written as part of the default output, or if the <b>-a</b> option is specified, control
    786 characters shall be written as:</p>
    787 <pre>
    788 <tt>"%s = %s;", &lt;</tt><i>control-character name</i><tt>&gt;, &lt;</tt><i>value</i><tt>&gt;
    789 </tt></pre>
    790 <p class="tent">where &lt;<i>value</i>&gt; is either the character, or some visual representation of the character if it is
    791 non-printable, or the string <tt>"&lt;undef&gt;"</tt> if the character is disabled.</p>
    792 </blockquote>
    793 <h4 class="mansect"><a name="tag_20_116_11" id="tag_20_116_11"></a>STDERR</h4>
    794 <blockquote>
    795 <p>The standard error shall be used only for diagnostic messages.</p>
    796 </blockquote>
    797 <h4 class="mansect"><a name="tag_20_116_12" id="tag_20_116_12"></a>OUTPUT FILES</h4>
    798 <blockquote>
    799 <p>None.</p>
    800 </blockquote>
    801 <h4 class="mansect"><a name="tag_20_116_13" id="tag_20_116_13"></a>EXTENDED DESCRIPTION</h4>
    802 <blockquote>
    803 <p>None.</p>
    804 </blockquote>
    805 <h4 class="mansect"><a name="tag_20_116_14" id="tag_20_116_14"></a>EXIT STATUS</h4>
    806 <blockquote>
    807 <p>The following exit values shall be returned:</p>
    808 <dl compact>
    809 <dd></dd>
    810 <dt>&nbsp;0</dt>
    811 <dd>Successful completion.</dd>
    812 <dt>&gt;0</dt>
    813 <dd>An error occurred.</dd>
    814 </dl>
    815 </blockquote>
    816 <h4 class="mansect"><a name="tag_20_116_15" id="tag_20_116_15"></a>CONSEQUENCES OF ERRORS</h4>
    817 <blockquote>
    818 <p>Default.</p>
    819 </blockquote>
    820 <hr>
    821 <div class="box"><em>The following sections are informative.</em></div>
    822 <h4 class="mansect"><a name="tag_20_116_16" id="tag_20_116_16"></a>APPLICATION USAGE</h4>
    823 <blockquote>
    824 <p>The <b>-g</b> flag is designed to facilitate the saving and restoring of terminal state from the shell level. For example, a
    825 program may:</p>
    826 <pre>
    827 <tt>saveterm=$(stty -g)                      # save terminal state
    828 restoresize=$(
    829     printf "stty rows %d cols %d" $(stty size)
    830 )                                        # save terminal size
    831 stty </tt><i>new settings</i><tt>                        # set new state
    832 ...
    833 [ -n "$saveterm" ] &amp;& stty "$saveterm"   # restore terminal state
    834 eval "$restoresize"                      # restore terminal size
    835 </tt></pre>
    836 <p class="tent">Since the format is unspecified, the saved value is not portable across systems.</p>
    837 <p class="tent">Since the <b>-a</b> format is so loosely specified, scripts that save and restore terminal settings should use the
    838 <b>-g</b> option.</p>
    839 </blockquote>
    840 <h4 class="mansect"><a name="tag_20_116_17" id="tag_20_116_17"></a>EXAMPLES</h4>
    841 <blockquote>
    842 <p>None.</p>
    843 </blockquote>
    844 <h4 class="mansect"><a name="tag_20_116_18" id="tag_20_116_18"></a>RATIONALE</h4>
    845 <blockquote>
    846 <p>The original <i>stty</i> description was taken directly from System V and reflected the System V terminal driver <b>termio</b>.
    847 It has been modified to correspond to the terminal driver <b>termios</b>.</p>
    848 <p class="tent">Output modes are specified only for XSI-conformant systems. All implementations are expected to provide <i>stty</i>
    849 operands corresponding to all of the output modes they support.</p>
    850 <p class="tent">The <i>stty</i> utility is primarily used to tailor the user interface of the terminal, such as selecting the
    851 preferred ERASE and KILL characters. As an application programming utility, <i>stty</i> can be used within shell scripts to alter
    852 the terminal settings for the duration of the script.</p>
    853 <p class="tent">The <b>termios</b> section states that individual disabling of control characters is possible through the option
    854 _POSIX_VDISABLE. If enabled, two conventions currently exist for specifying this: System V uses <tt>"^-"</tt>, and BSD uses
    855 <i>undef</i>. Both are accepted by <i>stty</i> in this volume of POSIX.1-2024. The other BSD convention of using the letter
    856 <tt>'u'</tt> was rejected because it conflicts with the actual letter <tt>'u'</tt>, which is an acceptable value for a control
    857 character.</p>
    858 <p class="tent">Early proposals did not specify the mapping of <tt>"^c"</tt> to control characters because the control characters
    859 were not specified in the POSIX locale character set description file requirements. The control character set is now specified in
    860 XBD <a href="../basedefs/V1_chap03.html#tag_03"><i>3. Definitions</i></a> , so the historical mapping is specified. Note that
    861 although the mapping corresponds to control-character key assignments on many terminals that use the ISO/IEC&nbsp;646:1991 standard
    862 (or ASCII) character encodings, the mapping specified here is to the control characters, not their keyboard encodings.</p>
    863 <p class="tent">Since <b>termios</b> supports separate speeds for input and output, two new options were added to specify each
    864 distinctly.</p>
    865 <p class="tent">Some historical implementations use standard input to get and set terminal characteristics; others use standard
    866 output. Since input from a login TTY is usually restricted to the owner while output to a TTY is frequently open to anyone, using
    867 standard input provides fewer chances of accidentally (or maliciously) altering the terminal settings of other users. Using
    868 standard input also allows <i>stty</i> <b>-a</b> and <i>stty</i> <b>-g</b> output to be redirected for later use. Therefore, usage
    869 of standard input is required by this volume of POSIX.1-2024.</p>
    870 </blockquote>
    871 <h4 class="mansect"><a name="tag_20_116_19" id="tag_20_116_19"></a>FUTURE DIRECTIONS</h4>
    872 <blockquote>
    873 <p>None.</p>
    874 </blockquote>
    875 <h4 class="mansect"><a name="tag_20_116_20" id="tag_20_116_20"></a>SEE ALSO</h4>
    876 <blockquote>
    877 <p><a href="../utilities/V3_chap02.html#tag_19"><i>2. Shell Command Language</i></a></p>
    878 <p class="tent">XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href=
    879 "../basedefs/V1_chap11.html#tag_11"><i>11. General Terminal Interface</i></a> , <a href=
    880 "../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a> , <a href=
    881 "../basedefs/termios.h.html"><i>&lt;termios.h&gt;</i></a></p>
    882 </blockquote>
    883 <h4 class="mansect"><a name="tag_20_116_21" id="tag_20_116_21"></a>CHANGE HISTORY</h4>
    884 <blockquote>
    885 <p>First released in Issue 2.</p>
    886 </blockquote>
    887 <h4 class="mansect"><a name="tag_20_116_22" id="tag_20_116_22"></a>Issue 5</h4>
    888 <blockquote>
    889 <p>The description of <b>tabs</b> is clarified.</p>
    890 <p class="tent">The FUTURE DIRECTIONS section is added.</p>
    891 </blockquote>
    892 <h4 class="mansect"><a name="tag_20_116_23" id="tag_20_116_23"></a>Issue 6</h4>
    893 <blockquote>
    894 <p>The LEGACY items <b>iuclc</b> (-<b>iuclc</b>), <b>xcase</b> (-<b>xcase</b>), <b>olcuc</b> (-<b>olcuc</b>), <b>lcase</b>
    895 (-<b>lcase</b>), and <b>LCASE</b> (-<b>LCASE</b>) are removed.</p>
    896 <p class="tent">IEEE&nbsp;Std&nbsp;1003.1-2001/Cor&nbsp;1-2002, item XCU/TC1/D6/37 is applied, applying IEEE PASC Interpretation
    897 1003.2 #133, fixing an error in the OPERANDS section for the Combination Modes <b>nl</b> (<b>-nl</b>).</p>
    898 </blockquote>
    899 <h4 class="mansect"><a name="tag_20_116_24" id="tag_20_116_24"></a>Issue 7</h4>
    900 <blockquote>
    901 <p>Austin Group Interpretation 1003.1-2001 #144 is applied, moving functionality relating to the IXANY symbol from the XSI option
    902 to the Base.</p>
    903 <p class="tent">SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.</p>
    904 <p class="tent">POSIX.1-2008, Technical Corrigendum 2, XCU/TC2-2008/0189 [908] is applied.</p>
    905 </blockquote>
    906 <h4 class="mansect"><a name="tag_20_116_25" id="tag_20_116_25"></a>Issue 8</h4>
    907 <blockquote>
    908 <p>Austin Group Defects 1053, 1532, and 1687 are applied, changing the <b>-g</b> option and adding the <b>rows</b> <i>number</i>,
    909 <b>cols</b> <i>number</i>, and <b>size</b> operands.</p>
    910 <p class="tent">Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p>
    911 <p class="tent">Austin Group Defect 1508 is applied, changing the EXIT STATUS section.</p>
    912 <p class="tent">Austin Group Defect 1604 is applied, changing <i>undef</i> to <tt>"&lt;undef&gt;"</tt> in the STDOUT section, and
    913 changing <b>icanon</b> to <b>-icanon</b> in the descriptions of <b>min</b> and <b>time</b>.</p>
    914 </blockquote>
    915 <div class="box"><em>End of informative text.</em></div>
    916 <hr>
    917 <p>&nbsp;</p>
    918 <a href="#top"><span class="topOfPage">return to top of page</span></a><br>
    919 <hr size="2" noshade>
    920 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br>
    921 POSIX™ is a Trademark of The IEEE.<br>
    922 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br>
    923 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
    924 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a>
    925 ]</font></center>
    926 <hr size="2" noshade>
    927 <div class="NAVHEADER">
    928 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
    929 <tr class="nav">
    930 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/strip.html" accesskey="P">&lt;&lt;&lt;
    931 Previous</a></td>
    932 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
    933 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/tabs.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
    934 </tr>
    935 </table>
    936 <hr align="left" width="100%"></div>
    937 </body>
    938 </html>