⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stty.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
This has the effect of setting (not setting)IEXTENin the<b>termios</b><b>c_lflag</b>field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .<dt><b>echo (-echo)</b><dd>Echo back (do not echo back) every character typed.This has the effect of setting (not setting)ECHOin the<b>termios</b><b>c_lflag</b>field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .<dt><b>echoe (-echoe)</b><dd>TheERASEcharacter will (will not) visually erase the last characterin the current line from thedisplay, if possible.This has the effect of setting (not setting)ECHOEin the<b>termios</b><b>c_lflag</b>field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .<dt><b>echok (-echok)</b><dd>Echo (do not echo)NLafterKILLcharacter.This has the effect of setting (not setting)ECHOKin the<b>termios</b><b>c_lflag</b>field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .<dt><b>echonl (-echonl)</b><dd>Echo (do not echo)NL,even if<b>echo</b>is disabled.This has the effect of setting (not setting)ECHONLin the<b>termios</b><b>c_lflag</b>field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .<dt><b>noflsh (-noflsh)</b><dd>Disable (enable) flush afterINTR,QUIT,SUSP.This has the effect of setting (not setting)NOFLSHin the<b>termios</b><b>c_lflag</b>field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .<dt><b>tostop (-tostop)</b><dd>Send SIGTTOU for background output.This has the effect of setting (not setting)TOSTOPin the<b>termios</b><b>c_lflag</b>field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .<dl><dt><b>Note:</b><dd>Setting TOSTOP has no effect on systems not supportingthe job control option, but all XSI-conformant systems do support this option.</dl><p></dl><h5><a name = "tag_001_014_2129_005">&nbsp;</a>Special Control Character Assignments</h5><dl compact><dt><i>&lt;control&gt;-character string</i><dd>Set<i>&lt;control&gt;-character</i>to<i>string</i>.If<i>&lt;control&gt;-character</i>is one of the character sequences in the first column ofthe following table,the corresponding <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a>  control characterfrom the second column will be recognised.This has the effect of setting the corresponding element of the<b>termios</b><b>c_cc</b>array (see the <b>XSH</b> specification<i><a href="../xsh/termios.h.html">&lt;termios.h&gt;</a></i>).<table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Control Character</b><th align=center><b>c_cc Subscript</b><th align=center><b>Description</b><tr valign=top><td align=left><b>eof</b><td align=left>VEOF<td align=left>EOF character<tr valign=top><td align=left><b>eol</b><td align=left>VEOL<td align=left>EOL character<tr valign=top><td align=left><b>erase</b><td align=left>VERASE<td align=left>ERASE character<tr valign=top><td align=left><b>intr</b><td align=left>VINTR<td align=left>INTR character<tr valign=top><td align=left><b>kill</b><td align=left>VKILL<td align=left>KILL character<tr valign=top><td align=left><b>quit</b><td align=left>VQUIT<td align=left>QUIT character<tr valign=top><td align=left><b>susp</b><td align=left>VSUSP<td align=left>SUSP character<tr valign=top><td align=left><b>start</b><td align=left>VSTART<td align=left>START character<tr valign=top><td align=left><b>stop</b><td align=left>VSTOP<td align=left>STOP character</table><h6 align=center><xref table="Control Character Names in <I>stty</i>"></xref>Table: Control Character Names in <i>stty</i></h6>If<i>string</i>is a single character, the control character will be set to that character.If<i>string</i>is the two-character sequence "^-" or the stringundef,the control character will be set to{_POSIX_VDISABLE},if it is in effect for the device; if{_POSIX_VDISABLE}is not in effect for the device, itwill be treated as an error.In the POSIX locale, if<i>string</i>is a two-character sequencebeginning with circumflex (^), and the second character isone of those listed in the <i>^c</i>column ofthe following table,the control character will be set to the correspondingcharacter value in the Value column of the table.<pre><table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>^<i>c</i></b><th align=center><b>Value</b><th align=center><b>^<i>c</i></b><th align=center><b>Value</b><th align=center><b>^<i>c</i></b><th align=center><b>Value</b><tr valign=top><td align=left>a, A<td align=left>&lt;SOH&gt;<td align=left>l, L<td align=left>&lt;FF&gt;<td align=left>w, W<td align=left>&lt;ETB&gt;<tr valign=top><td align=left>b, B<td align=left>&lt;STX&gt;<td align=left>m, M<td align=left>&lt;CR&gt;<td align=left>x, X<td align=left>&lt;CAN&gt;<tr valign=top><td align=left>c, C<td align=left>&lt;ETX&gt;<td align=left>n, N<td align=left>&lt;SO&gt;<td align=left>y, Y<td align=left>&lt;EM&gt;<tr valign=top><td align=left>d, D<td align=left>&lt;EOT&gt;<td align=left>o, O<td align=left>&lt;SI&gt;<td align=left>z, Z<td align=left>&lt;SUB&gt;<tr valign=top><td align=left>e, E<td align=left>&lt;ENQ&gt;<td align=left>p, P<td align=left>&lt;DLE&gt;<td align=left>[<td align=left>&lt;ESC&gt;<tr valign=top><td align=left>f, F<td align=left>&lt;ACK&gt;<td align=left>q, Q<td align=left>&lt;DC1&gt;<td align=left>\<td align=left>&lt;FS&gt;<tr valign=top><td align=left>g, G<td align=left>&lt;BEL&gt;<td align=left>r, R<td align=left>&lt;DC2&gt;<td align=left>]<td align=left>&lt;GS&gt;<tr valign=top><td align=left>h, H<td align=left>&lt;BS&gt;<td align=left>s, S<td align=left>&lt;DC3&gt;<td align=left>^<td align=left>&lt;RS&gt;<tr valign=top><td align=left>i, I<td align=left>&lt;HT&gt;<td align=left>t, T<td align=left>&lt;DC4&gt;<td align=left>_<td align=left>&lt;US&gt;<tr valign=top><td align=left>j, J<td align=left>&lt;LF&gt;<td align=left>u, U<td align=left>&lt;NAK&gt;<td align=left>?<td align=left>&lt;DEL&gt;<tr valign=top><td align=left>k, K<td align=left>&lt;VT&gt;<td align=left>v, V<td align=left>&lt;SYN&gt;<td align=left>&nbsp;<td align=left>&nbsp;</table></pre><h6 align=center><xref table="Circumflex Control Characters in <I>stty</i>"></xref>Table: Circumflex Control Characters in <i>stty</i></h6><dt><b>min </b><i>number</i><dd><dt><b>time </b><i>number</i><dd>Set the value of<b>min</b>or<b>time</b>to <i>number</i>.MIN and TIME are used in non-canonical mode input processing(<b>-icanon</b>).</dl><h5><a name = "tag_001_014_2129_006">&nbsp;</a>Combination Modes</h5><xref type="5" name="sttycomb"></xref><dl compact><dt><i>saved settings</i><dd>Set the current terminal characteristics to the savedsettings produced by the<b>-g</b>option.<dt><b>evenp</b> or <b>parity</b><dd>Enable <b>parenb</b> and <b>cs7</b>;disable<b>parodd</b>.<dt><b>oddp</b><dd>Enable <b>parenb</b>, <b>cs7</b> and <b>parodd</b>.<dt><b>-parity</b>, <b>-evenp</b> or <b>-oddp</b><dd>Disable <b>parenb</b>, and set<b>cs8</b>.<dt><b>raw</b>&nbsp;(<b>-raw</b>&nbsp;or&nbsp;<b>cooked</b>)<dd>Enable (disable) raw input and output.Raw mode is equivalent to setting:<pre><code>stty cs8 erase ^- kill ^- intr ^- \    quit ^- eof ^- eol ^- -opost -inpck</code></pre><dt><b>nl (-nl)</b><dd>Enable (disable) <b>icrnl</b>.In addition, <b>-nl</b> unsets<b>inlcr</b> and <b>igncr</b>.<dt><b>lcase (-lcase)</b><dd>Set (unset)<b>xcase</b>,<b>iuclc</b>and<b>olcuc</b>.(<b>LEGACY</b>)<dt><b>LCASE (-LCASE)</b><dd>Equivalent tolcase (-lcase).(<b>LEGACY</b>)<dt><b>tabs</b>&nbsp;(<b>-tabs</b>&nbsp;or&nbsp;<b>tab3</b>)<dd>Preserve tabs (expand to spaces) when printing.<dt><b>ek</b><dd>ResetERASEandKILLcharacters back to system defaults.<dt><b>sane</b><dd>Reset all modes to some reasonable, unspecified, values.</dl></blockquote><h4><a name = "tag_001_014_2130">&nbsp;</a>STDIN</h4><blockquote>Although no input is read from standard input, standard input isused to get the current terminal I/O characteristics and to setnew terminal I/O characteristics.</blockquote><h4><a name = "tag_001_014_2131">&nbsp;</a>INPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2132">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>stty</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_CTYPE</i><dd>This variable will determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single-versus multi-byte characters in arguments)and which characters are in the class<b>print</b>.<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_2133">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2134">&nbsp;</a>STDOUT</h4><blockquote>If operands are specified, no output is produced.<p>If the<b>-g</b>option is specified,<i>stty</i>will write to standard output thecurrent settings in a form that can be used as arguments toanother instance of<i>stty</i>on the same system.<p>If the<b>-a</b>option is specified, all of the information as described inthe OPERANDS section will be written to standard output.Unless otherwisespecified, this information is written asspace-separatedtokens in an unspecified format, on one or more lines, with anunspecified number of tokens per line.Additional information may be written.<p>If no options or operands are specified, an unspecifiedsubset of the information written for the<b>-a</b>option is written.<p>If speed information is written as partof the default output, or if the<b>-a</b>option is specified andif the terminal input speed and output speed are the same,the speed information will be written as follows:<p><code><pre><tt>"speed %d baud;"</tt>, &lt;<i>speed</i>&gt;</pre></code><p>Otherwise, speeds will be written as:<p><code><pre><tt>"ispeed %d baud; ospeed %d baud;"</tt>, &lt;<i>ispeed</i>&gt;,&lt;<i>ospeed</i>&gt;</pre></code><p>In locales other than the POSIX locale, the word<b>baud</b>may be changed to something more appropriate in those locales.<p>If control characters are writtenas part of the default output, or if the<b>-a</b>option is specified,control characters will be written as:<p><code><pre><tt>"%s = %s;"</tt>, &lt;<i>&lt;control&gt;-character name</i>&gt;,&lt;<i>value</i>&gt;</pre></code>where <i>value</i> is either the character, or some visual representationof the character if it is non-printable, or the string&lt;undef&gt;if the character is disabled.</blockquote><h4><a name = "tag_001_014_2135">&nbsp;</a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_2136">&nbsp;</a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2137">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2138">&nbsp;</a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>The terminal options were read or set successfully.<dt>&gt;0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_001_014_2139">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2140">&nbsp;</a>APPLICATION USAGE</h4><blockquote>The<b>-g</b>flag is designed tofacilitate the saving and restoring of terminal state fromthe shell level.For example, a program may:<pre><code>saveterm="$(stty -g)"       # save terminal statestty <i>(new settings)</i>         # set new state...                             # ...stty $saveterm              # restore terminal state</code></pre><p>Since the format is unspecified, the saved value is not portableacross systems.<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.</blockquote><h4><a name = "tag_001_014_2141">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2142">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>The IEEE PASC 1003.2 Interpretations Committee has forwarded concerns aboutparts of this interface definition to the IEEE PASC Shell and Utilities Working Groupwhich is identifying the corrections.A future revision of this specification will align withIEEE Std. 1003.2b when finalised.</blockquote><h4><a name = "tag_001_014_2143">&nbsp;</a>SEE ALSO</h4><blockquote>The <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -