Un outil pour savoir si une commande est posix - retour accueil
git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |
true.html (7776B)
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>true</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/tr.html" accesskey="P"><<< 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/tsort.html" accesskey="N">Next 19 >>></a></td> 20 </tr> 21 </table> 22 <hr align="left" width="100%"></div> 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="true" id="true"></a> <a name="tag_20_127" id="tag_20_127"></a><!-- true --> 28 <h4 class="mansect"><a name="tag_20_127_01" id="tag_20_127_01"></a>NAME</h4> 29 <blockquote>true — return true value</blockquote> 30 <h4 class="mansect"><a name="tag_20_127_02" id="tag_20_127_02"></a>SYNOPSIS</h4> 31 <blockquote class="synopsis"> 32 <p><code><tt>true</tt></code></p> 33 </blockquote> 34 <h4 class="mansect"><a name="tag_20_127_03" id="tag_20_127_03"></a>DESCRIPTION</h4> 35 <blockquote> 36 <p>The <i>true</i> utility shall return with exit code zero.</p> 37 </blockquote> 38 <h4 class="mansect"><a name="tag_20_127_04" id="tag_20_127_04"></a>OPTIONS</h4> 39 <blockquote> 40 <p>None.</p> 41 </blockquote> 42 <h4 class="mansect"><a name="tag_20_127_05" id="tag_20_127_05"></a>OPERANDS</h4> 43 <blockquote> 44 <p>None.</p> 45 </blockquote> 46 <h4 class="mansect"><a name="tag_20_127_06" id="tag_20_127_06"></a>STDIN</h4> 47 <blockquote> 48 <p>Not used.</p> 49 </blockquote> 50 <h4 class="mansect"><a name="tag_20_127_07" id="tag_20_127_07"></a>INPUT FILES</h4> 51 <blockquote> 52 <p>None.</p> 53 </blockquote> 54 <h4 class="mansect"><a name="tag_20_127_08" id="tag_20_127_08"></a>ENVIRONMENT VARIABLES</h4> 55 <blockquote> 56 <p>None.</p> 57 </blockquote> 58 <h4 class="mansect"><a name="tag_20_127_09" id="tag_20_127_09"></a>ASYNCHRONOUS EVENTS</h4> 59 <blockquote> 60 <p>Default.</p> 61 </blockquote> 62 <h4 class="mansect"><a name="tag_20_127_10" id="tag_20_127_10"></a>STDOUT</h4> 63 <blockquote> 64 <p>Not used.</p> 65 </blockquote> 66 <h4 class="mansect"><a name="tag_20_127_11" id="tag_20_127_11"></a>STDERR</h4> 67 <blockquote> 68 <p>Not used.</p> 69 </blockquote> 70 <h4 class="mansect"><a name="tag_20_127_12" id="tag_20_127_12"></a>OUTPUT FILES</h4> 71 <blockquote> 72 <p>None.</p> 73 </blockquote> 74 <h4 class="mansect"><a name="tag_20_127_13" id="tag_20_127_13"></a>EXTENDED DESCRIPTION</h4> 75 <blockquote> 76 <p>None.</p> 77 </blockquote> 78 <h4 class="mansect"><a name="tag_20_127_14" id="tag_20_127_14"></a>EXIT STATUS</h4> 79 <blockquote> 80 <p>Zero.</p> 81 </blockquote> 82 <h4 class="mansect"><a name="tag_20_127_15" id="tag_20_127_15"></a>CONSEQUENCES OF ERRORS</h4> 83 <blockquote> 84 <p>None.</p> 85 </blockquote> 86 <hr> 87 <div class="box"><em>The following sections are informative.</em></div> 88 <h4 class="mansect"><a name="tag_20_127_16" id="tag_20_127_16"></a>APPLICATION USAGE</h4> 89 <blockquote> 90 <p>This utility is typically used in shell scripts, as shown in the EXAMPLES section.</p> 91 <p>Although the special built-in utility <b>:</b> (<a href="../utilities/colon.html"><i>colon</i></a>) is similar to <i>true</i>, 92 there are some notable differences, including:</p> 93 <ul> 94 <li> 95 <p>Whereas <a href="../utilities/colon.html"><i>colon</i></a> is required to accept, and do nothing with, any number of arguments, 96 <i>true</i> is only required to accept, and discard, a first argument of <tt>"--"</tt>. Passing any other argument(s) to 97 <i>true</i> may cause its behavior to differ from that described in this standard.</p> 98 </li> 99 <li> 100 <p>A non-interactive shell exits when a redirection error occurs with <a href="../utilities/colon.html"><i>colon</i></a> (unless 101 executed via <a href="../utilities/command.html"><i>command</i></a>), whereas with <i>true</i> it does not.</p> 102 </li> 103 <li> 104 <p>Variable assignments preceding the command name persist after executing <a href="../utilities/colon.html"><i>colon</i></a> 105 (unless executed via <a href="../utilities/command.html"><i>command</i></a>), but not after executing <i>true</i>.</p> 106 </li> 107 <li> 108 <p>In shell implementations where <i>true</i> is not provided as a built-in, using <a href= 109 "../utilities/colon.html"><i>colon</i></a> avoids the overheads associated with executing an external utility.</p> 110 </li> 111 </ul> 112 </blockquote> 113 <h4 class="mansect"><a name="tag_20_127_17" id="tag_20_127_17"></a>EXAMPLES</h4> 114 <blockquote> 115 <p>This command is executed forever:</p> 116 <pre> 117 <tt>while true 118 do 119 command 120 done 121 </tt></pre></blockquote> 122 <h4 class="mansect"><a name="tag_20_127_18" id="tag_20_127_18"></a>RATIONALE</h4> 123 <blockquote> 124 <p>None.</p> 125 </blockquote> 126 <h4 class="mansect"><a name="tag_20_127_19" id="tag_20_127_19"></a>FUTURE DIRECTIONS</h4> 127 <blockquote> 128 <p>None.</p> 129 </blockquote> 130 <h4 class="mansect"><a name="tag_20_127_20" id="tag_20_127_20"></a>SEE ALSO</h4> 131 <blockquote> 132 <p><a href="../utilities/V3_chap02.html#tag_19_09"><i>2.9 Shell Commands</i></a> , <a href= 133 "../utilities/V3_chap02.html#tag_19_17"><i>colon</i></a> , <a href="../utilities/command.html#"><i>command</i></a> , <a href= 134 "../utilities/false.html#"><i>false</i></a></p> 135 </blockquote> 136 <h4 class="mansect"><a name="tag_20_127_21" id="tag_20_127_21"></a>CHANGE HISTORY</h4> 137 <blockquote> 138 <p>First released in Issue 2.</p> 139 </blockquote> 140 <h4 class="mansect"><a name="tag_20_127_22" id="tag_20_127_22"></a>Issue 6</h4> 141 <blockquote> 142 <p>IEEE Std 1003.1-2001/Cor 1-2002, item XCU/TC1/D6/39 is applied, replacing the terms "None" and "Default" from 143 the STDERR and EXIT STATUS sections, respectively, with terms as defined in <a href="../utilities/V3_chap01.html#tag_18_04"><i>1.4 144 Utility Description Defaults</i></a> .</p> 145 </blockquote> 146 <h4 class="mansect"><a name="tag_20_127_23" id="tag_20_127_23"></a>Issue 8</h4> 147 <blockquote> 148 <p>Austin Group Defect 1640 is applied, clarifying the differences between <i>true</i> and <b>:</b> (<a href= 149 "../utilities/colon.html"><i>colon</i></a>).</p> 150 </blockquote> 151 <div class="box"><em>End of informative text.</em></div> 152 <hr> 153 <p> </p> 154 <a href="#top"><span class="topOfPage">return to top of page</span></a><br> 155 <hr size="2" noshade> 156 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br> 157 POSIX™ is a Trademark of The IEEE.<br> 158 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br> 159 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href= 160 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a> 161 ]</font></center> 162 <hr size="2" noshade> 163 <div class="NAVHEADER"> 164 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 165 <tr class="nav"> 166 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/tr.html" accesskey="P"><<< 167 Previous</a></td> 168 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 169 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/tsort.html" accesskey="N">Next 170 >>></a></td> 171 </tr> 172 </table> 173 <hr align="left" width="100%"></div> 174 </body> 175 </html>