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

📄 xcu_chap01.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!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-2003 The Open Group, All Rights Reserved --><title>Rationale for Shell and Utilities</title></head><body bgcolor="white"><basefont size="3"> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright &copy; 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h2><a name="tag_02"></a>Rationale for Shell and Utilities</h2><h3><a name="tag_02_01"></a>Introduction</h3><h4><a name="tag_02_01_01"></a>Scope</h4><p>Refer to <a href="xbd_chap01.html#tag_01_01_01"><i>Scope</i></a> .</p><h4><a name="tag_02_01_02"></a>Conformance</h4><p>Refer to <a href="xbd_chap02.html#tag_01_02"><i>Conformance</i></a> .</p><h4><a name="tag_02_01_03"></a>Normative References</h4><p>There is no additional rationale provided for this section.</p><h4><a name="tag_02_01_04"></a>Change History</h4><p>The change history is provided as an informative section, to track changes from previous issues ofIEEE&nbsp;Std&nbsp;1003.1-2001.</p><p>The following sections describe changes made to the Shell and Utilities volume of IEEE&nbsp;Std&nbsp;1003.1-2001 since Issue 5of the base document. The CHANGE HISTORY section for each utility describes technical changes made to that utility from Issue 5.Changes between earlier issues of the base document and Issue 5 are not included.</p><p>The change history between Issue 5 and Issue 6 also lists the changes since the ISO&nbsp;POSIX-2:1993 standard.</p><h5><a name="tag_02_01_04_01"></a>Changes from Issue 5 to Issue 6 (IEEE&nbsp;Std&nbsp;1003.1-2001)</h5><p>The following list summarizes the major changes that were made in the Shell and Utilities volume ofIEEE&nbsp;Std&nbsp;1003.1-2001 from Issue 5 to Issue 6:</p><ul><li><p>This volume of IEEE&nbsp;Std&nbsp;1003.1-2001 is extensively revised so that it can be both an IEEE POSIX Standard and an OpenGroup Technical Standard.</p></li><li><p>The terminology has been reworked to meet the style requirements.</p></li><li><p>Shading notation and margin codes are introduced for identification of options within the volume.</p></li><li><p>This volume of IEEE&nbsp;Std&nbsp;1003.1-2001 is updated to mandate support of FIPS 151-2. The following changes were made:</p><ul><li><p>Support is mandated for the capabilities associated with the following symbolic constants:</p><blockquote><pre>_POSIX_CHOWN_RESTRICTED_POSIX_JOB_CONTROL_POSIX_SAVED_IDS</pre></blockquote></li><li><p>In the environment for the login shell, the environment variables <i>LOGNAME</i> and <i>HOME</i> shall be defined and have theproperties described in the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap07.html">Chapter 7, Locale</a>.</p></li></ul></li><li><p>This volume of IEEE&nbsp;Std&nbsp;1003.1-2001 is updated to align with some features of the Single UNIX Specification.</p></li><li><p>A new section on Utility Limits is added.</p></li><li><p>A section on the Relationships to Other Documents is added.</p></li><li><p>Concepts and definitions have been moved to a separate volume.</p></li><li><p>A RATIONALE section is added to each reference page.</p></li><li><p>The <a href="../utilities/c99.html"><i>c99</i></a> utility is added as a replacement for <i>c89</i>, which is withdrawn in thisissue.</p></li><li><p>IEEE&nbsp;Std&nbsp;1003.2d-1994 is incorporated, adding the <a href="../utilities/qalter.html"><i>qalter</i></a>, <a href="../utilities/qdel.html"><i>qdel</i></a>, <a href="../utilities/qhold.html"><i>qhold</i></a>, <a href="../utilities/qmove.html"><i>qmove</i></a>, <a href="../utilities/qmsg.html"><i>qmsg</i></a>, <a href="../utilities/qrerun.html"><i>qrerun</i></a>, <a href="../utilities/qrls.html"><i>qrls</i></a>, <a href="../utilities/qselect.html"><i>qselect</i></a>, <a href="../utilities/qsig.html"><i>qsig</i></a>, <a href="../utilities/qstat.html"><i>qstat</i></a>, and <a href="../utilities/qsub.html"><i>qsub</i></a> utilities.</p></li><li><p>IEEE&nbsp;P1003.2b draft standard is incorporated, making extensive updates and adding the <a href="../utilities/iconv.html"><i>iconv</i></a> utility.</p></li><li><p>IEEE PASC Interpretations are applied.</p></li><li><p>The Open Group's corrigenda and resolutions are applied.</p></li></ul><h5><a name="tag_02_01_04_02"></a>New Features in Issue 6</h5><p>The following table lists the new utilities introduced since the ISO&nbsp;POSIX-2:1993 standard (as modified byIEEE&nbsp;Std&nbsp;1003.2d-1994). Apart from the <a href="../utilities/c99.html"><i>c99</i></a> and <a href="../utilities/iconv.html"><i>iconv</i></a> utilities, these are all part of the XSI extension.</p><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th colspan="8" align="center"><p class="tent"><b>New Utilities in Issue 6</b></p></th></tr><tr valign="top"><td align="left"><p class="tent"><br><a href="../utilities/admin.html"><i>admin</i></a><br><a href="../utilities/c99.html"><i>c99</i></a><br><a href="../utilities/cal.html"><i>cal</i></a><br><a href="../utilities/cflow.html"><i>cflow</i></a><br>&nbsp;</p></td><td align="left"><p class="tent"><br><a href="../utilities/compress.html"><i>compress</i></a><br><a href="../utilities/cxref.html"><i>cxref</i></a><br><a href="../utilities/delta.html"><i>delta</i></a><br><a href="../utilities/fuser.html"><i>fuser</i></a><br>&nbsp;</p></td><td align="left"><p class="tent"><br><a href="../utilities/gencat.html"><i>gencat</i></a><br><a href="../utilities/get.html"><i>get</i></a><br><a href="../utilities/hash.html"><i>hash</i></a><br><a href="../utilities/iconv.html"><i>iconv</i></a><br>&nbsp;</p></td><td align="left"><p class="tent"><br><a href="../utilities/ipcrm.html"><i>ipcrm</i></a><br><a href="../utilities/ipcs.html"><i>ipcs</i></a><br><a href="../utilities/link.html"><i>link</i></a><br><a href="../utilities/m4.html"><i>m4</i></a><br>&nbsp;</p></td><td align="left"><p class="tent"><br><a href="../utilities/nl.html"><i>nl</i></a><br><a href="../utilities/prs.html"><i>prs</i></a><br><a href="../utilities/sact.html"><i>sact</i></a><br><a href="../utilities/sccs.html"><i>sccs</i></a><br>&nbsp;</p></td><td align="left"><p class="tent"><br><a href="../utilities/tsort.html"><i>tsort</i></a><br><a href="../utilities/ulimit.html"><i>ulimit</i></a><br><a href="../utilities/uncompress.html"><i>uncompress</i></a><br><a href="../utilities/unget.html"><i>unget</i></a><br>&nbsp;</p></td><td align="left"><p class="tent"><br><a href="../utilities/unlink.html"><i>unlink</i></a><br><a href="../utilities/uucp.html"><i>uucp</i></a><br><a href="../utilities/uustat.html"><i>uustat</i></a><br><a href="../utilities/uux.html"><i>uux</i></a><br>&nbsp;</p></td><td align="left"><p class="tent"><br><a href="../utilities/val.html"><i>val</i></a><br><a href="../utilities/what.html"><i>what</i></a><br><a href="../utilities/zcat.html"><i>zcat</i></a><br>&nbsp;</p></td></tr></table></center><h4><a name="tag_02_01_05"></a>Terminology</h4><p>Refer to <a href="xbd_chap01.html#tag_01_01_04"><i>Terminology</i></a> .</p><h4><a name="tag_02_01_06"></a>Definitions</h4><p>Refer to <a href="xbd_chap03.html#tag_01_03"><i>Definitions</i></a> .</p><h4><a name="tag_02_01_07"></a>Relationship to Other Documents</h4><h5><a name="tag_02_01_07_01"></a>System Interfaces</h5><p>It has been pointed out that the Shell and Utilities volume of IEEE&nbsp;Std&nbsp;1003.1-2001 assumes that a great deal offunctionality from the System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001 is present, but never states exactly how much(and strictly does not need to since both are mandated on a conforming system). This section is an attempt to clarify theassumptions.</p><h5><a name="tag_02_01_07_02"></a>File Removal</h5><p>This is intended to be a summary of the <a href="../functions/unlink.html"><i>unlink</i>()</a> and <a href="../functions/rmdir.html"><i>rmdir</i>()</a> requirements. Note that it is possible using the <a href="../functions/unlink.html"><i>unlink</i>()</a> function for item 4. to occur.</p><h5><a name="tag_02_01_07_03"></a>Concepts Derived from the ISO C Standard</h5><p>This section was introduced to address the issue that there was insufficient detail presented by such utilities as <a href="../utilities/awk.html"><i>awk</i></a> or <a href="../utilities/sh.html"><i>sh</i></a> about their procedural control statementsand their methods of performing arithmetic functions.</p><p>The ISO&nbsp;C standard was selected as a model because most historical implementations of the standard utilities were writtenin C. Thus, it was more likely that they would act in the desired manner without modification.</p><p>Using the ISO&nbsp;C standard is primarily a notational convenience so that the many procedural languages in the Shell andUtilities volume of IEEE&nbsp;Std&nbsp;1003.1-2001 would not have to be rigorously described in every aspect. Its selection doesnot require that the standard utilities be written in Standard C; they could be written in Common Usage C, Ada, Pascal, assemblerlanguage, or anything else.</p><p>The sizes of the various numeric values refer to C-language data types that are allowed to be different sizes by the ISO&nbsp;Cstandard. Thus, like a C-language application, a shell application cannot rely on their exact size. However, it can rely on theirminimum sizes expressed in the ISO&nbsp;C standard, such as {LONG_MAX} for a <b>long</b> type.</p><p>The behavior on overflow is undefined for ISO&nbsp;C standard arithmetic. Therefore, the standard utilities can use &quot;bignum''representation for integers so that there is no fixed maximum unless otherwise stated in the utility description. Similarly,standard utilities can use infinite-precision representations for floating-point arithmetic, as long as these representationsexceed the ISO&nbsp;C standard requirements.</p><p>This section addresses only the issue of semantics; it is not intended to specify syntax. For example, the ISO&nbsp;C standardrequires that 0L be recognized as an integer constant equal to zero, but utilities such as <a href="../utilities/awk.html"><i>awk</i></a> and <a href="../utilities/sh.html"><i>sh</i></a> are not required to recognize 0L (thoughthey are allowed to, as an extension).</p><p>The ISO&nbsp;C standard requires that a C compiler must issue a diagnostic for constants that are too large to represent. Moststandard utilities are not required to issue these diagnostics; for example, the command:</p><blockquote><pre><tt>diff -C 2147483648 file1 file2</tt></pre></blockquote><p>has undefined behavior, and the <a href="../utilities/diff.html"><i>diff</i></a> utility is not required to issue a diagnosticeven if the number 2147483648 cannot be represented.</p><h4><a name="tag_02_01_08"></a>Portability</h4><p>Refer to <a href="xbd_chap01.html#tag_01_01_18"><i>Portability</i></a> .</p><h5><a name="tag_02_01_08_01"></a>Codes</h5><p>Refer to <a href="xbd_chap01.html#tag_01_01_18_01"><i>Codes</i></a> .</p><h4><a name="tag_02_01_09"></a>Utility Limits</h4><p>This section grew out of an idea that originated with the original POSIX.1, in the tables of system limits for the <a href="../functions/sysconf.html"><i>sysconf</i>()</a> and <a href="../functions/pathconf.html"><i>pathconf</i>()</a> functions. The ideabeing that a conforming application can be written to use the most restrictive values that a minimal system can provide, but itshould not have to. The values provided represent compromises so that some vendors can use historically limited versions of UNIXsystem utilities. They are the highest values that a strictly conforming application can assume, given no other information.</p><p>However, by using the <a href="../utilities/getconf.html"><i>getconf</i></a> utility or the <a href="../functions/sysconf.html"><i>sysconf</i>()</a> function, the elegant application can be tailored to more liberal values on someof the specific instances of specific implementations.</p><p>There is no explicitly stated requirement that an implementation provide finite limits for any of these numeric values; theimplementation is free to provide essentially unbounded capabilities (where it makes sense), stopping only at reasonable points

⌨️ 快捷键说明

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