xbd_chap12.html

来自「posix标准英文,html格式」· HTML 代码 · 共 316 行 · 第 1/2 页

HTML
316
字号
<!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-2004 IEEE and The Open Group, All Rights Reserved --><title>Rationale</title></head><body><basefont size="3"> <center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2004 Edition<br>Copyright &copy; 2001-2004 The IEEE and The Open Group</font></center><hr size="2" noshade><h3><a name="tag_01_12">   A.12 </a>Utility Conventions</h3><h4><a name="tag_01_12_01">  A.12.1 </a>Utility Argument Syntax</h4><p>The standard developers considered that recent trends toward diluting the SYNOPSIS sections of historical reference pages to theequivalent of:</p><blockquote><pre><tt>command</tt> <b>[</b><i>options</i><b>][</b><i>operands</i><b>]</b></pre></blockquote><p>were a disservice to the reader. Therefore, considerable effort was placed into rigorous definitions of all the command linearguments and their interrelationships. The relationships depicted in the synopses are normative parts ofIEEE&nbsp;Std&nbsp;1003.1-2001; this information is sometimes repeated in textual form, but that is only for clarity withincontext.</p><p>The use of &quot;undefined&quot; for conflicting argument usage and for repeated usage of the same option is meant to prevent conformingapplications from using conflicting arguments or repeated options unless specifically allowed (as is the case with <a href="../utilities/ls.html"><i>ls</i></a>, which allows simultaneous, repeated use of the <b>-C</b>, <b>-l</b>, and <b>-1</b> options).Many historical implementations will tolerate this usage, choosing either the first or the last applicable argument. This tolerancecan continue, but conforming applications cannot rely upon it. (Other implementations may choose to print usage messagesinstead.)</p><p>The use of &quot;undefined&quot; for conflicting argument usage also allows an implementation to make reasonable extensions to utilitieswhere the implementor considers mutually-exclusive options according to IEEE&nbsp;Std&nbsp;1003.1-2001 to have a sensible meaningand result.</p><p>IEEE&nbsp;Std&nbsp;1003.1-2001 does not define the result of a command when an option-argument or operand is not followed byellipses and the application specifies more than one of that option-argument or operand. This allows an implementation to definevalid (although non-standard) behavior for the utility when more than one such option or operand is specified.</p><p>The following table summarizes the requirements for option-arguments:</p><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th align="center"><p class="tent">&nbsp;</p></th><th colspan="3" align="center"><p class="tent"><b>SYNOPSIS Shows:</b></p></th></tr><tr valign="top"><th align="center"><p class="tent">&nbsp;</p></th><th colspan="3" align="center"><p class="tent"><b>_</b></p></th></tr><tr valign="top"><td align="right"><p class="tent">&nbsp;</p></td><td align="center"><p class="tent">-a <i>arg</i></p></td><td align="center"><p class="tent">-b<i>arg</i></p></td><td align="center"><p class="tent">-c[<i>arg</i>]</p></td></tr><tr valign="top"><td align="right"><p class="tent">Conforming</p></td><td align="center"><p class="tent">&nbsp;</p></td><td align="center"><p class="tent">&nbsp;</p></td><td align="center"><p class="tent">&nbsp;</p></td></tr><tr valign="top"><td align="right"><p class="tent">application uses:</p></td><td align="center"><p class="tent">-a <i>arg</i></p></td><td align="center"><p class="tent">-b<i>arg</i></p></td><td align="center"><p class="tent">-c<i>arg</i> or <tt>-c</tt></p></td></tr><tr valign="top"><td align="right"><p class="tent">System supports:</p></td><td align="center"><p class="tent">-a <i>arg</i> and <tt>-a</tt><i>arg</i></p></td><td align="center"><p class="tent">-b <i>arg</i> and <i>-barg</i></p></td><td align="center"><p class="tent">-carg and <tt>-c</tt></p></td></tr><tr valign="top"><td align="right"><p class="tent">Non-conforming</p></td><td align="center"><p class="tent">&nbsp;</p></td><td align="center"><p class="tent">&nbsp;</p></td><td align="center"><p class="tent">&nbsp;</p></td></tr><tr valign="top"><td align="right"><p class="tent">applications may use:</p></td><td align="center"><p class="tent">-a<i>arg</i></p></td><td align="center"><p class="tent">-b <i>arg</i></p>

⌨️ 快捷键说明

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