1262 lines
42 KiB
HTML
1262 lines
42 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>stty</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="stty"></a> <a name="tag_04_135"></a><!-- stty -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_04_135_01"></a>NAME</h4>
|
|
|
|
<blockquote>stty - set the options for a terminal</blockquote>
|
|
|
|
<h4><a name="tag_04_135_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<p><code><tt>stty</tt> <b>[</b> <tt>-a| -g</tt><b>]</b><tt><br>
|
|
<br>
|
|
stty</tt> <i>operands</i><tt><br>
|
|
</tt></code></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>stty</i> utility shall set or report on terminal I/O characteristics for the device that is its standard input. Without
|
|
options or operands specified, it shall report the settings of certain characteristics, usually those that differ from
|
|
implementation-defined defaults. Otherwise, it shall modify the terminal state according to the specified operands. Detailed
|
|
information about the modes listed in the first five groups below are described in the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>. Operands
|
|
in the Combination Modes group (see <a href="#tag_04_135_05_06">Combination Modes</a> ) are implemented using operands in the
|
|
previous groups. Some combinations of operands are mutually-exclusive on some terminal types; the results of using such
|
|
combinations are unspecified.</p>
|
|
|
|
<p>Typical implementations of this utility require a communications line configured to use the <b>termios</b> interface defined in
|
|
the System Interfaces volume of IEEE Std 1003.1-2001. On systems where none of these lines are available, and on lines
|
|
not currently configured to support the <b>termios</b> interface, some of the operands need not affect terminal
|
|
characteristics.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_04"></a>OPTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>stty</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p>
|
|
|
|
<p>The following options shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><b>-a</b></dt>
|
|
|
|
<dd>Write to standard output all the current settings for the terminal.</dd>
|
|
|
|
<dt><b>-g</b></dt>
|
|
|
|
<dd>Write to standard output all the current settings in an unspecified form that can be used as arguments to another invocation of
|
|
the <i>stty</i> utility on the same system. The form used shall not contain any characters that would require quoting to avoid word
|
|
expansion by the shell; see <a href="xcu_chap02.html#tag_02_06"><i>Word Expansions</i></a> .</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_05"></a>OPERANDS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following operands shall be supported to set the terminal characteristics.</p>
|
|
|
|
<h5><a name="tag_04_135_05_01"></a>Control Modes</h5>
|
|
|
|
<dl compact>
|
|
<dt><b>parenb </b> (<b>-parenb</b>)</dt>
|
|
|
|
<dd>Enable (disable) parity generation and detection. This shall have the effect of setting (not setting) PARENB in the
|
|
<b>termios</b> <i>c_cflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>parodd </b> (<b>-parodd</b>)</dt>
|
|
|
|
<dd><br>
|
|
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
|
|
defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11,
|
|
General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>cs5 cs6 cs7 cs8</b></dt>
|
|
|
|
<dd>Select character size, if possible. This shall have the effect of setting CS5, CS6, CS7, and CS8, respectively, in the
|
|
<b>termios</b> <i>c_cflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><i>number</i></dt>
|
|
|
|
<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
|
|
longer be asserted. This shall have the effect of setting the input and output <b>termios</b> baud rate values as defined in the
|
|
Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General
|
|
Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>ispeed </b> <i>number</i></dt>
|
|
|
|
<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
|
|
be specified by the value of the output baud rate. This shall have the effect of setting the input <b>termios</b> baud rate values
|
|
as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter
|
|
11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>ospeed </b> <i>number</i></dt>
|
|
|
|
<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
|
|
shall no longer be asserted. This shall have the effect of setting the output <b>termios</b> baud rate values as defined in the
|
|
Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General
|
|
Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>hupcl </b> (<b>-hupcl</b>)</dt>
|
|
|
|
<dd>Stop asserting modem control lines (do not stop asserting modem control lines) on last close. This shall have the effect of
|
|
setting (not setting) HUPCL in the <b>termios</b> <i>c_cflag</i> field, as defined in the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>hup </b> (<b>-hup</b>)</dt>
|
|
|
|
<dd>Equivalent to <b>hupcl</b>( <b>-hupcl</b>).</dd>
|
|
|
|
<dt><b>cstopb </b> (<b>-cstopb</b>)</dt>
|
|
|
|
<dd>Use two (one) stop bits per character. This shall have the effect of setting (not setting) CSTOPB in the <b>termios</b>
|
|
<i>c_cflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>cread </b> (<b>-cread</b>)</dt>
|
|
|
|
<dd>Enable (disable) the receiver. This shall have the effect of setting (not setting) CREAD in the <b>termios</b> <i>c_cflag</i>
|
|
field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>clocal </b> (<b>-clocal</b>)</dt>
|
|
|
|
<dd>Assume a line without (with) modem control. This shall have the effect of setting (not setting) CLOCAL in the <b>termios</b>
|
|
<i>c_cflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
</dl>
|
|
|
|
<p>It is unspecified whether <i>stty</i> shall report an error if an attempt to set a Control Mode fails.</p>
|
|
|
|
<h5><a name="tag_04_135_05_02"></a>Input Modes</h5>
|
|
|
|
<dl compact>
|
|
<dt><b>ignbrk </b> (<b>-ignbrk</b>)</dt>
|
|
|
|
<dd>Ignore (do not ignore) break on input. This shall have the effect of setting (not setting) IGNBRK in the <b>termios</b>
|
|
<i>c_iflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>brkint </b> (<b>-brkint</b>)</dt>
|
|
|
|
<dd>Signal (do not signal) INTR on break. This shall have the effect of setting (not setting) BRKINT in the <b>termios</b>
|
|
<i>c_iflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>ignpar </b> (<b>-ignpar</b>)</dt>
|
|
|
|
<dd>Ignore (do not ignore) bytes with parity errors. This shall have the effect of setting (not setting) IGNPAR in the
|
|
<b>termios</b> <i>c_iflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>parmrk </b> (<b>-parmrk</b>)</dt>
|
|
|
|
<dd><br>
|
|
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>
|
|
field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>inpck </b> (<b>-inpck</b>)</dt>
|
|
|
|
<dd>Enable (disable) input parity checking. This shall have the effect of setting (not setting) INPCK in the <b>termios</b>
|
|
<i>c_iflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>istrip </b> (<b>-istrip</b>)</dt>
|
|
|
|
<dd>Strip (do not strip) input characters to seven bits. This shall have the effect of setting (not setting) ISTRIP in the
|
|
<b>termios</b> <i>c_iflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>inlcr </b> (<b>-inlcr</b>)</dt>
|
|
|
|
<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>
|
|
<i>c_iflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>igncr (-igncr)</b></dt>
|
|
|
|
<dd>Ignore (do not ignore) CR on input. This shall have the effect of setting (not setting) IGNCR in the <b>termios</b>
|
|
<i>c_iflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>icrnl </b> (<b>-icrnl</b>)</dt>
|
|
|
|
<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>
|
|
<i>c_iflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>ixon </b> (<b>-ixon</b>)</dt>
|
|
|
|
<dd>Enable (disable) START/STOP output control. Output from the system is stopped when the system receives STOP and started when
|
|
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
|
|
defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11,
|
|
General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>ixany </b> (<b>-ixany</b>)</dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Allow any character to restart output. This shall have the effect of setting (not setting) IXANY in the <b>termios</b>
|
|
<i>c_iflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>. <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></dd>
|
|
|
|
<dt><b>ixoff </b> (<b>-ixoff</b>)</dt>
|
|
|
|
<dd>Request that the system send (not send) STOP characters when the input queue is nearly full and START characters to resume data
|
|
transmission. This shall have the effect of setting (not setting) IXOFF in the <b>termios</b> <i>c_iflag</i> field, as defined in
|
|
the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General
|
|
Terminal Interface</a>.</dd>
|
|
</dl>
|
|
|
|
<h5><a name="tag_04_135_05_03"></a>Output Modes</h5>
|
|
|
|
<dl compact>
|
|
<dt><b>opost </b> (<b>-opost</b>)</dt>
|
|
|
|
<dd>Post-process output (do not post-process output; ignore all other output modes). This shall have the effect of setting (not
|
|
setting) OPOST in the <b>termios</b> <i>c_oflag</i> field, as defined in the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>ocrnl </b> (<b>-ocrnl</b>)</dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
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>
|
|
field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>onocr </b> (<b>-onocr</b>)</dt>
|
|
|
|
<dd>Do not (do) output CR at column zero. This shall have the effect of setting (not setting) ONOCR in the <b>termios</b>
|
|
<i>c_oflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>onlret </b> (<b>-onlret</b>)</dt>
|
|
|
|
<dd>The terminal newline key performs (does not perform) the CR function. This shall have the effect of setting (not setting)
|
|
ONLRET in the <b>termios</b> <i>c_oflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a
|
|
href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>ofill </b> (<b>-ofill</b>)</dt>
|
|
|
|
<dd>Use fill characters (use timing) for delays. This shall have the effect of setting (not setting) OFILL in the <b>termios</b>
|
|
<i>c_oflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>ofdel </b> (<b>-ofdel</b>)</dt>
|
|
|
|
<dd>Fill characters are DELs (NULs). This shall have the effect of setting (not setting) OFDEL in the <b>termios</b> <i>c_oflag</i>
|
|
field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>cr0 cr1 cr2 cr3</b></dt>
|
|
|
|
<dd>Select the style of delay for CRs. This shall have the effect of setting CRDLY to CR0, CR1, CR2, or CR3, respectively, in the
|
|
<b>termios</b> <i>c_oflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>nl0 nl1</b></dt>
|
|
|
|
<dd>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> <i>c_oflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>tab0 tab1 tab2 tab3</b></dt>
|
|
|
|
<dd><br>
|
|
Select the style of delay for horizontal tabs. This shall have the effect of setting TABDLY to TAB0, TAB1, TAB2, or TAB3,
|
|
respectively, in the <b>termios</b> <i>c_oflag</i> field, as defined in the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>. Note that
|
|
TAB3 has the effect of expanding <tab>s to <space>s.</dd>
|
|
|
|
<dt><b>tabs </b> (<b>-tabs</b>)</dt>
|
|
|
|
<dd>Synonym for <b>tab0</b> ( <b>tab3</b>).</dd>
|
|
|
|
<dt><b>bs0 bs1</b></dt>
|
|
|
|
<dd>Select the style of delay for backspaces. This shall have the effect of setting BSDLY to BS0 or BS1, respectively, in the
|
|
<b>termios</b> <i>c_oflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>ff0 ff1</b></dt>
|
|
|
|
<dd>Select the style of delay for form-feeds. This shall have the effect of setting FFDLY to FF0 or FF1, respectively, in the
|
|
<b>termios</b> <i>c_oflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>vt0 vt1</b></dt>
|
|
|
|
<dd>Select the style of delay for vertical-tabs. This shall have the effect of setting VTDLY to VT0 or VT1, respectively, in the
|
|
<b>termios</b> <i>c_oflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>. <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></dd>
|
|
</dl>
|
|
|
|
<h5><a name="tag_04_135_05_04"></a>Local Modes</h5>
|
|
|
|
<dl compact>
|
|
<dt><b>isig </b> (<b>-isig</b>)</dt>
|
|
|
|
<dd>Enable (disable) the checking of characters against the special control characters INTR, QUIT, and SUSP. This shall have the
|
|
effect of setting (not setting) ISIG in the <b>termios</b> <i>c_lflag</i> field, as defined in the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>icanon </b> (<b>-icanon</b>)</dt>
|
|
|
|
<dd>Enable (disable) canonical input (ERASE and KILL processing). This shall have the effect of setting (not setting) ICANON in the
|
|
<b>termios</b> <i>c_lflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>iexten </b> (<b>-iexten</b>)</dt>
|
|
|
|
<dd>Enable (disable) any implementation-defined special control characters not currently controlled by <b>icanon</b>, <b>isig</b>,
|
|
<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>
|
|
field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>echo </b> (<b>-echo</b>)</dt>
|
|
|
|
<dd>Echo back (do not echo back) every character typed. This shall have the effect of setting (not setting) ECHO in the
|
|
<b>termios</b> <i>c_lflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>echoe </b> (<b>-echoe</b>)</dt>
|
|
|
|
<dd>The ERASE character visually erases (does not erase) the last character in the current line from the display, if possible. This
|
|
shall have the effect of setting (not setting) ECHOE in the <b>termios</b> <i>c_lflag</i> field, as defined in the Base Definitions
|
|
volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal
|
|
Interface</a>.</dd>
|
|
|
|
<dt><b>echok </b> (<b>-echok</b>)</dt>
|
|
|
|
<dd>Echo (do not echo) NL after KILL character. This shall have the effect of setting (not setting) ECHOK in the <b>termios</b>
|
|
<i>c_lflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>echonl </b> (<b>-echonl</b>)</dt>
|
|
|
|
<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
|
|
<b>termios</b> <i>c_lflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>noflsh </b> (<b>-noflsh</b>)</dt>
|
|
|
|
<dd>Disable (enable) flush after INTR, QUIT, SUSP. This shall have the effect of setting (not setting) NOFLSH in the <b>termios</b>
|
|
<i>c_lflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
|
|
<dt><b>tostop </b> (<b>-tostop</b>)</dt>
|
|
|
|
<dd>Send SIGTTOU for background output. This shall have the effect of setting (not setting) TOSTOP in the <b>termios</b>
|
|
<i>c_lflag</i> field, as defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>.</dd>
|
|
</dl>
|
|
|
|
<h5><a name="tag_04_135_05_05"></a>Special Control Character Assignments</h5>
|
|
|
|
<dl compact>
|
|
<dt><<i>control</i>>-<i>character string</i></dt>
|
|
|
|
<dd><br>
|
|
Set <<i>control</i>>-<i>character</i> to <i>string</i>. If <<i>control</i>>-<i>character</i> is one of the character
|
|
sequences in the first column of the following table, the corresponding Base Definitions volume of IEEE Std 1003.1-2001,
|
|
<a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a> control character from the second column
|
|
shall be recognized. This has the effect of setting the corresponding element of the <b>termios</b> <i>c_cc</i> array (see the Base
|
|
Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap13.html#tag_13">Chapter 13, Headers</a>, <a
|
|
href="../basedefs/termios.h.html"><i><termios.h></i></a>).<br>
|
|
<center><b>Table: Control Character Names in <i>stty</i></b></center>
|
|
|
|
<center>
|
|
<table border="1" cellpadding="3" align="center">
|
|
<tr valign="top">
|
|
<th align="center">
|
|
<p class="tent"><b>Control Character</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>c_cc Subscript</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Description</b></p>
|
|
</th>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>eof</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VEOF</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">EOF character</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>eol</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VEOL</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">EOL character</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>erase</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VERASE</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">ERASE character</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>intr</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VINTR</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">INTR character</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>kill</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VKILL</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">KILL character</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>quit</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VQUIT</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">QUIT character</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>susp</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VSUSP</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">SUSP character</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>start</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VSTART</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">START character</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>stop</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VSTOP</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">STOP character</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<p>If <i>string</i> is a single character, the control character shall be set to that character. If <i>string</i> is the
|
|
two-character sequence <tt>"^-"</tt> or the string <i>undef</i>, the control character shall be set to _POSIX_VDISABLE , if it 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 locale,
|
|
if <i>string</i> is a two-character sequence beginning with circumflex ( <tt>'^'</tt> ), and the second character is one of those
|
|
listed in the <tt>"^c"</tt> column of the following table, the control character shall be set to the corresponding character value
|
|
in the Value column of the table.</p>
|
|
|
|
<center><b>Table: Circumflex Control Characters in <i>stty</i></b></center>
|
|
|
|
<center>
|
|
<table border="1" cellpadding="3" align="center">
|
|
<tr valign="top">
|
|
<th align="center">
|
|
<p class="tent"><b>^c</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Value</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>^c</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Value</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>^c</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Value</b></p>
|
|
</th>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">a, A</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><SOH></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">l, L</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><FF></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">w, W</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><ETB></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">b, B</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><STX></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">m, M</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><CR></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">x, X</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><CAN></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">c, C</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><ETX></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">n, N</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><SO></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">y, Y</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><EM></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">d, D</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><EOT></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">o, O</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><SI></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">z, Z</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><SUB></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">e, E</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><ENQ></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">p, P</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><DLE></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">[</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><ESC></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">f, F</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><ACK></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">q, Q</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><DC1></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">\</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><FS></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">g, G</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><BEL></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">r, R</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><DC2></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">]</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><GS></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">h, H</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><BS></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">s, S</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><DC3></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">^</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><RS></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">i, I</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><HT></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">t, T</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><DC4></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">_</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><US></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">j, J</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><LF></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">u, U</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><NAK></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">?</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><DEL></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">k, K</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><VT></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">v, V</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><SYN></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</dd>
|
|
|
|
<dt><b>min </b> <i>number</i></dt>
|
|
|
|
<dd><br>
|
|
Set the value of MIN to <i>number</i>. MIN is used in non-canonical mode input processing ( <b>icanon</b>).</dd>
|
|
|
|
<dt><b>time </b> <i>number</i></dt>
|
|
|
|
<dd><br>
|
|
Set the value of TIME to <i>number</i>. TIME is used in non-canonical mode input processing ( <b>icanon</b>).</dd>
|
|
</dl>
|
|
|
|
<h5><a name="tag_04_135_05_06"></a>Combination Modes</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>saved settings</i></dt>
|
|
|
|
<dd><br>
|
|
Set the current terminal characteristics to the saved settings produced by the <b>-g</b> option.</dd>
|
|
|
|
<dt><b>evenp</b> or <b>parity</b></dt>
|
|
|
|
<dd><br>
|
|
Enable <b>parenb</b> and <b>cs7</b>; disable <b>parodd</b>.</dd>
|
|
|
|
<dt><b>oddp</b></dt>
|
|
|
|
<dd><br>
|
|
Enable <b>parenb</b>, <b>cs7</b>, and <b>parodd</b>.</dd>
|
|
|
|
<dt><b>-parity</b>, <b>-evenp</b>, or <b>-oddp</b></dt>
|
|
|
|
<dd><br>
|
|
Disable <b>parenb</b>, and set <b>cs8</b>.</dd>
|
|
|
|
<dt><b>raw </b> (<b>-raw</b> or <b>cooked</b>)</dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border=
|
|
"0"><br>
|
|
Enable (disable) raw input and output. Raw mode shall be equivalent to setting:
|
|
|
|
<pre>
|
|
<tt>stty cs8 erase ^- kill ^- intr ^- \
|
|
quit ^- eof ^- eol ^- -post -inpck <img src="../images/opt-end.gif" border="0">
|
|
</tt>
|
|
</pre>
|
|
</dd>
|
|
|
|
<dt><b>nl </b> (<b>-nl</b>)</dt>
|
|
|
|
<dd><br>
|
|
Enable (disable) <b>icrnl</b>. In addition, <b>-nl</b> unsets <b>inlcr</b> and <b>igncr</b>.</dd>
|
|
|
|
<dt><b>ek</b></dt>
|
|
|
|
<dd>Reset ERASE and KILL characters back to system defaults.</dd>
|
|
|
|
<dt><b>sane</b></dt>
|
|
|
|
<dd><br>
|
|
Reset all modes to some reasonable, unspecified, values.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_06"></a>STDIN</h4>
|
|
|
|
<blockquote>
|
|
<p>Although no input is read from standard input, standard input shall be used to get the current terminal I/O characteristics and
|
|
to set new terminal I/O characteristics.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_07"></a>INPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_08"></a>ENVIRONMENT VARIABLES</h4>
|
|
|
|
<blockquote>
|
|
<p>The following environment variables shall affect the execution of <i>stty</i>:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>LANG</i></dt>
|
|
|
|
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
|
|
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
|
|
|
|
<dt><i>LC_ALL</i></dt>
|
|
|
|
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
|
|
|
|
<dt><i>LC_CTYPE</i></dt>
|
|
|
|
<dd>This variable determines the locale for the interpretation of sequences of bytes of text data as characters (for example,
|
|
single-byte as opposed to multi-byte characters in arguments) and which characters are in the class <b>print</b>.</dd>
|
|
|
|
<dt><i>LC_MESSAGES</i></dt>
|
|
|
|
<dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard
|
|
error.</dd>
|
|
|
|
<dt><i>NLSPATH</i></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_09"></a>ASYNCHRONOUS EVENTS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_10"></a>STDOUT</h4>
|
|
|
|
<blockquote>
|
|
<p>If operands are specified, no output shall be produced.</p>
|
|
|
|
<p>If the <b>-g</b> option is specified, <i>stty</i> shall write to standard output the current settings in a form that can be used
|
|
as arguments to another instance of <i>stty</i> on the same system.</p>
|
|
|
|
<p>If the <b>-a</b> option is specified, all of the information as described in the OPERANDS section shall be written to standard
|
|
output. Unless otherwise specified, this information shall be written as <space>-separated tokens in an unspecified format,
|
|
on one or more lines, with an unspecified number of tokens per line. Additional information may be written.</p>
|
|
|
|
<p>If no options or operands are specified, an unspecified subset of the information written for the <b>-a</b> option shall be
|
|
written.</p>
|
|
|
|
<p>If speed information is written as part of the default output, or if the <b>-a</b> option is specified and if the terminal input
|
|
speed and output speed are the same, the speed information shall be written as follows:</p>
|
|
|
|
<pre>
|
|
<tt>"speed %d baud;", <</tt><i>speed</i><tt>>
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>Otherwise, speeds shall be written as:</p>
|
|
|
|
<pre>
|
|
<tt>"ispeed %d baud; ospeed %d baud;", <</tt><i>ispeed</i><tt>>, <</tt><i>ospeed</i><tt>>
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>In locales other than the POSIX locale, the word <b>baud</b> may be changed to something more appropriate in those locales.</p>
|
|
|
|
<p>If control characters are written as part of the default output, or if the <b>-a</b> option is specified, control characters
|
|
shall be written as:</p>
|
|
|
|
<pre>
|
|
<tt>"%s = %s;", <</tt><i>control-character name</i><tt>>, <</tt><i>value</i><tt>>
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>where <<i>value</i>> is either the character, or some visual representation of the character if it is non-printable, or
|
|
the string <i>undef</i> if the character is disabled.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_11"></a>STDERR</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard error shall be used only for diagnostic messages.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_12"></a>OUTPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_13"></a>EXTENDED DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_14"></a>EXIT STATUS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following exit values shall be returned:</p>
|
|
|
|
<dl compact>
|
|
<dt> 0</dt>
|
|
|
|
<dd>The terminal options were read or set successfully.</dd>
|
|
|
|
<dt>>0</dt>
|
|
|
|
<dd>An error occurred.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_15"></a>CONSEQUENCES OF ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_04_135_16"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>The <b>-g</b> flag is designed to facilitate the saving and restoring of terminal state from the shell level. For example, a
|
|
program may:</p>
|
|
|
|
<pre>
|
|
<tt>saveterm="$(stty -g)" # save terminal state
|
|
stty</tt> <i>(new settings)</i> <tt> # set new state
|
|
... # ...
|
|
stty $saveterm # restore terminal state
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>Since the format is unspecified, the saved value is not portable across systems.</p>
|
|
|
|
<p>Since the <b>-a</b> format is so loosely specified, scripts that save and restore terminal settings should use the <b>-g</b>
|
|
option.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_17"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_18"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>The original <i>stty</i> description was taken directly from System V and reflected the System V terminal driver <b>termio</b>.
|
|
It has been modified to correspond to the terminal driver <b>termios</b>.</p>
|
|
|
|
<p>Output modes are specified only for XSI-conformant systems. All implementations are expected to provide <i>stty</i> operands
|
|
corresponding to all of the output modes they support.</p>
|
|
|
|
<p>The <i>stty</i> utility is primarily used to tailor the user interface of the terminal, such as selecting the preferred ERASE
|
|
and KILL characters. As an application programming utility, <i>stty</i> can be used within shell scripts to alter the terminal
|
|
settings for the duration of the script.</p>
|
|
|
|
<p>The <b>termios</b> section states that individual disabling of control characters is possible through the option
|
|
_POSIX_VDISABLE. If enabled, two conventions currently exist for specifying this: System V uses <tt>"^-"</tt> , and BSD uses
|
|
<i>undef</i>. Both are accepted by <i>stty</i> in this volume of IEEE Std 1003.1-2001. The other BSD convention of using
|
|
the letter <tt>'u'</tt> was rejected because it conflicts with the actual letter <tt>'u'</tt> , which is an acceptable value for a
|
|
control character.</p>
|
|
|
|
<p>Early proposals did not specify the mapping of <tt>"^c"</tt> to control characters because the control characters were not
|
|
specified in the POSIX locale character set description file requirements. The control character set is now specified in the Base
|
|
Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap03.html">Chapter 3, Definitions</a> so the
|
|
historical mapping is specified. Note that although the mapping corresponds to control-character key assignments on many terminals
|
|
that use the ISO/IEC 646:1991 standard (or ASCII) character encodings, the mapping specified here is to the control
|
|
characters, not their keyboard encodings.</p>
|
|
|
|
<p>Since <b>termios</b> supports separate speeds for input and output, two new options were added to specify each distinctly.</p>
|
|
|
|
<p>Some historical implementations use standard input to get and set terminal characteristics; others use standard output. Since
|
|
input from a login TTY is usually restricted to the owner while output to a TTY is frequently open to anyone, using standard input
|
|
provides fewer chances of accidentally (or maliciously) altering the terminal settings of other users. Using 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 of standard input is
|
|
required by this volume of IEEE Std 1003.1-2001.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_19"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_20"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="xcu_chap02.html#tag_02"><i>Shell Command Language</i></a> , the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>, <a href=
|
|
"../basedefs/termios.h.html"><i><termios.h></i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_21"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 2.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_22"></a>Issue 5</h4>
|
|
|
|
<blockquote>
|
|
<p>The description of <b>tabs</b> is clarified.</p>
|
|
|
|
<p>The FUTURE DIRECTIONS section is added.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_135_23"></a>Issue 6</h4>
|
|
|
|
<blockquote>
|
|
<p>The legacy items <b>iuclc</b>(- <b>iuclc</b>), <b>xcase</b>, <b>olcuc</b>(- <b>olcuc</b>), <b>lcase</b>(- <b>lcase</b>), and
|
|
<b>LCASE</b>(- <b>LCASE</b>) are removed.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|