isposix

Un outil pour savoir si une commande est posix - retour accueil

git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |

command.html (27330B)


      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>command</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/comm.html" accesskey="P">&lt;&lt;&lt;
     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/compress.html" accesskey="N">Next
     19 &gt;&gt;&gt;</a></td>
     20 </tr>
     21 </table>
     22 <hr align="left" width="100%"></div>
     23 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3">
     24 <center><font size="2">The Open Group Base Specifications Issue 8<br>
     25 IEEE Std 1003.1-2024<br>
     26 Copyright © 2001-2024 The IEEE and The Open Group</font></center>
     27 <hr size="2" noshade>
     28 <a name="top" id="top"></a> <a name="command" id="command"></a> <a name="tag_20_22" id="tag_20_22"></a><!-- command -->
     29 <h4 class="mansect"><a name="tag_20_22_01" id="tag_20_22_01"></a>NAME</h4>
     30 <blockquote>command — execute a simple command</blockquote>
     31 <h4 class="mansect"><a name="tag_20_22_02" id="tag_20_22_02"></a>SYNOPSIS</h4>
     32 <blockquote class="synopsis">
     33 <p><code><tt>command</tt> <b>[</b><tt>-p</tt><b>]</b> <i>command_name</i> <b>[</b><i>argument</i><tt>...</tt><b>]</b> <tt><br>
     34 <br>
     35 command</tt> <b>[</b><tt>-p</tt><b>][</b><tt>-v|-V</tt><b>]</b> <i>command_name</i> <tt><br></tt></code></p>
     36 </blockquote>
     37 <h4 class="mansect"><a name="tag_20_22_03" id="tag_20_22_03"></a>DESCRIPTION</h4>
     38 <blockquote>
     39 <p>The <i>command</i> utility shall cause the shell to treat the arguments as a simple command, suppressing the shell function
     40 lookup that is described in <a href="../utilities/V3_chap02.html#tag_19_09_01_04"><i>2.9.1.4 Command Search and Execution</i></a> ,
     41 item 1c.</p>
     42 <p>If the <i>command_name</i> is the same as the name of one of the special built-in utilities, the special properties in the
     43 enumerated list at the beginning of <a href="../utilities/V3_chap02.html#tag_19_15"><i>2.15 Special Built-In Utilities</i></a>
     44 shall not occur. In every other respect, if <i>command_name</i> is not the name of a function, the effect of <i>command</i> (with
     45 no options) shall be the same as omitting <i>command</i>, except that <i>command_name</i> does not appear in the command word
     46 position in the <i>command</i> command, and consequently is not subject to alias substitution (see <a href=
     47 "../utilities/V3_chap02.html#tag_19_03_01"><i>2.3.1 Alias Substitution</i></a> ) nor recognized as a reserved word (see <a href=
     48 "../utilities/V3_chap02.html#tag_19_04"><i>2.4 Reserved Words</i></a> ).</p>
     49 <p>When the <b>-v</b> or <b>-V</b> option is used, the <i>command</i> utility shall provide information concerning how a command
     50 name is interpreted by the shell.</p>
     51 <p>The <i>command</i> utility shall be treated as a declaration utility if the first argument passed to the utility is recognized
     52 as a declaration utility. In this case, subsequent words of the form <i>name</i>=<i>word</i> shall be expanded in an assignment
     53 context. See <a href="../utilities/V3_chap02.html#tag_19_09_01_01"><i>2.9.1.1 Order of Processing</i></a> .</p>
     54 </blockquote>
     55 <h4 class="mansect"><a name="tag_20_22_04" id="tag_20_22_04"></a>OPTIONS</h4>
     56 <blockquote>
     57 <p>The <i>command</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax
     58 Guidelines</i></a> .</p>
     59 <p>The following options shall be supported:</p>
     60 <dl compact>
     61 <dd></dd>
     62 <dt><b>-p</b></dt>
     63 <dd>Perform the command search using a default value for <i>PATH</i> that is guaranteed to find all of the standard utilities.</dd>
     64 <dt><b>-v</b></dt>
     65 <dd>Write a string to standard output that indicates the pathname or command that will be used by the shell, in the current shell
     66 execution environment (see <a href="../utilities/V3_chap02.html#tag_19_13"><i>2.13 Shell Execution Environment</i></a> ), to invoke
     67 <i>command_name</i>, but do not invoke <i>command_name</i>.
     68 <ul>
     69 <li>
     70 <p>Executable utilities, regular built-in utilities, <i>command_name</i>s including a &lt;slash&gt; character, and any
     71 implementation-provided functions that are found using the <i>PATH</i> variable (as described in <a href=
     72 "../utilities/V3_chap02.html#tag_19_09_01_04"><i>2.9.1.4 Command Search and Execution</i></a> ), shall be written as absolute
     73 pathnames.</p>
     74 </li>
     75 <li>
     76 <p>Shell functions, special built-in utilities, regular built-in utilities not associated with a <i>PATH</i> search, and shell
     77 reserved words shall be written as just their names.</p>
     78 </li>
     79 <li>
     80 <p>An alias shall be written as a command line that represents its alias definition.</p>
     81 </li>
     82 <li>
     83 <p>Otherwise, no output shall be written and the exit status shall reflect that the name was not found.</p>
     84 </li>
     85 </ul>
     86 </dd>
     87 <dt><b>-V</b></dt>
     88 <dd>Write a string to standard output that indicates how the name given in the <i>command_name</i> operand will be interpreted by
     89 the shell, in the current shell execution environment (see <a href="../utilities/V3_chap02.html#tag_19_13"><i>2.13 Shell Execution
     90 Environment</i></a> ), but do not invoke <i>command_name</i>. Although the format of this string is unspecified, it shall indicate
     91 in which of the following categories <i>command_name</i> falls and shall include the information stated:
     92 <ul>
     93 <li>
     94 <p>Executable utilities, regular built-in utilities, and any implementation-provided functions that are found using the <i>PATH</i>
     95 variable (as described in <a href="../utilities/V3_chap02.html#tag_19_09_01_04"><i>2.9.1.4 Command Search and Execution</i></a> ),
     96 shall be identified as such and include the absolute pathname in the string.</p>
     97 </li>
     98 <li>
     99 <p>Other shell functions shall be identified as functions.</p>
    100 </li>
    101 <li>
    102 <p>Aliases shall be identified as aliases and their definitions included in the string.</p>
    103 </li>
    104 <li>
    105 <p>Special built-in utilities shall be identified as special built-in utilities.</p>
    106 </li>
    107 <li>
    108 <p>Regular built-in utilities not associated with a <i>PATH</i> search shall be identified as regular built-in utilities. (The term
    109 &quot;regular&quot; need not be used.)</p>
    110 </li>
    111 <li>
    112 <p>Shell reserved words shall be identified as reserved words.</p>
    113 </li>
    114 </ul>
    115 </dd>
    116 </dl>
    117 </blockquote>
    118 <h4 class="mansect"><a name="tag_20_22_05" id="tag_20_22_05"></a>OPERANDS</h4>
    119 <blockquote>
    120 <p>The following operands shall be supported:</p>
    121 <dl compact>
    122 <dd></dd>
    123 <dt><i>argument</i></dt>
    124 <dd>One of the strings treated as an argument to <i>command_name</i>.</dd>
    125 <dt><i>command_name</i></dt>
    126 <dd><br>
    127 The name of a utility or a special built-in utility.</dd>
    128 </dl>
    129 </blockquote>
    130 <h4 class="mansect"><a name="tag_20_22_06" id="tag_20_22_06"></a>STDIN</h4>
    131 <blockquote>
    132 <p>Not used.</p>
    133 </blockquote>
    134 <h4 class="mansect"><a name="tag_20_22_07" id="tag_20_22_07"></a>INPUT FILES</h4>
    135 <blockquote>
    136 <p>None.</p>
    137 </blockquote>
    138 <h4 class="mansect"><a name="tag_20_22_08" id="tag_20_22_08"></a>ENVIRONMENT VARIABLES</h4>
    139 <blockquote>
    140 <p>The following environment variables shall affect the execution of <i>command</i>:</p>
    141 <dl compact>
    142 <dd></dd>
    143 <dt><i>LANG</i></dt>
    144 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href=
    145 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization
    146 variables used to determine the values of locale categories.)</dd>
    147 <dt><i>LC_ALL</i></dt>
    148 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
    149 <dt><i>LC_CTYPE</i></dt>
    150 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
    151 opposed to multi-byte characters in arguments).</dd>
    152 <dt><i>LC_MESSAGES</i></dt>
    153 <dd><br>
    154 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error and
    155 informative messages written to standard output.</dd>
    156 <dt><i>NLSPATH</i></dt>
    157 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    158 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border=
    159 "0"></dd>
    160 <dt><i>PATH</i></dt>
    161 <dd>Determine the search path used during the command search described in <a href=
    162 "../utilities/V3_chap02.html#tag_19_09_01_04"><i>2.9.1.4 Command Search and Execution</i></a> , except as described under the
    163 <b>-p</b> option.</dd>
    164 </dl>
    165 </blockquote>
    166 <h4 class="mansect"><a name="tag_20_22_09" id="tag_20_22_09"></a>ASYNCHRONOUS EVENTS</h4>
    167 <blockquote>
    168 <p>Default.</p>
    169 </blockquote>
    170 <h4 class="mansect"><a name="tag_20_22_10" id="tag_20_22_10"></a>STDOUT</h4>
    171 <blockquote>
    172 <p>When the <b>-v</b> option is specified, standard output shall be formatted as:</p>
    173 <pre>
    174 <tt>"%s\n", &lt;</tt><i>pathname or command</i><tt>&gt;
    175 </tt></pre>
    176 <p>When the <b>-V</b> option is specified, standard output shall be formatted as:</p>
    177 <pre>
    178 <tt>"%s\n", &lt;</tt><i>unspecified</i><tt>&gt;
    179 </tt></pre></blockquote>
    180 <h4 class="mansect"><a name="tag_20_22_11" id="tag_20_22_11"></a>STDERR</h4>
    181 <blockquote>
    182 <p>The standard error shall be used only for diagnostic messages.</p>
    183 </blockquote>
    184 <h4 class="mansect"><a name="tag_20_22_12" id="tag_20_22_12"></a>OUTPUT FILES</h4>
    185 <blockquote>
    186 <p>None.</p>
    187 </blockquote>
    188 <h4 class="mansect"><a name="tag_20_22_13" id="tag_20_22_13"></a>EXTENDED DESCRIPTION</h4>
    189 <blockquote>
    190 <p>None.</p>
    191 </blockquote>
    192 <h4 class="mansect"><a name="tag_20_22_14" id="tag_20_22_14"></a>EXIT STATUS</h4>
    193 <blockquote>
    194 <p>When the <b>-v</b> or <b>-V</b> options are specified, the following exit values shall be returned:</p>
    195 <dl compact>
    196 <dd></dd>
    197 <dt>&nbsp;0</dt>
    198 <dd>Successful completion.</dd>
    199 <dt>&gt;0</dt>
    200 <dd>The <i>command_name</i> could not be found or an error occurred.</dd>
    201 </dl>
    202 <p>Otherwise, the following exit values shall be returned:</p>
    203 <dl compact>
    204 <dd></dd>
    205 <dt>126</dt>
    206 <dd>The utility specified by <i>command_name</i> was found but could not be invoked.</dd>
    207 <dt>127</dt>
    208 <dd>An error occurred in the <i>command</i> utility or the utility specified by <i>command_name</i> could not be found.</dd>
    209 </dl>
    210 <p>Otherwise, the exit status of <i>command</i> shall be that of the simple command specified by the arguments to
    211 <i>command</i>.</p>
    212 </blockquote>
    213 <h4 class="mansect"><a name="tag_20_22_15" id="tag_20_22_15"></a>CONSEQUENCES OF ERRORS</h4>
    214 <blockquote>
    215 <p>Default.</p>
    216 </blockquote>
    217 <hr>
    218 <div class="box"><em>The following sections are informative.</em></div>
    219 <h4 class="mansect"><a name="tag_20_22_16" id="tag_20_22_16"></a>APPLICATION USAGE</h4>
    220 <blockquote>
    221 <p>This utility is required to be intrinsic. See <a href="../utilities/V3_chap01.html#tag_18_07"><i>1.7 Intrinsic Utilities</i></a>
    222 for details.</p>
    223 <p>The order for command search allows functions to override regular built-ins and path searches. This utility is necessary to
    224 allow functions that have the same name as a utility to call the utility (instead of a recursive call to the function).</p>
    225 <p>The system default path is available using <a href="../utilities/getconf.html"><i>getconf</i></a>; however, since <a href=
    226 "../utilities/getconf.html"><i>getconf</i></a> may need to have the <i>PATH</i> set up before it can be called itself, the
    227 following can be used:</p>
    228 <pre>
    229 <tt>command -p getconf PATH
    230 </tt></pre>
    231 <p>There are some advantages to suppressing the special characteristics of special built-ins on occasion. For example:</p>
    232 <pre>
    233 <tt>command exec &gt; </tt><i>unwritable-file</i><tt>
    234 </tt></pre>
    235 <p>does not cause a non-interactive script to abort, so that the output status can be checked by the script.</p>
    236 <p>The <i>command</i>, <a href="../utilities/env.html"><i>env</i></a>, <a href="../utilities/nohup.html"><i>nohup</i></a>, <a href=
    237 "../utilities/time.html"><i>time</i></a>, <a href="../utilities/timeout.html"><i>timeout</i></a>, and <a href=
    238 "../utilities/xargs.html"><i>xargs</i></a> utilities have been specified to use exit code 127 if a utility to be invoked cannot be
    239 found, so that applications can distinguish &quot;failure to find a utility&quot; from &quot;invoked utility exited with an error indication&quot;.
    240 However, the <i>command</i> and <a href="../utilities/nohup.html"><i>nohup</i></a> utilities also use exit code 127 when an error
    241 occurs in those utilities, which means exit code 127 is not universally a &quot;not found&quot; indicator. The value 127 was chosen because
    242 it is not commonly used for other meanings; most utilities use small values for &quot;normal error conditions&quot; and the values above
    243 128 can be confused with termination due to receipt of a signal. The value 126 was chosen in a similar manner to indicate that the
    244 utility could be found, but not invoked. Some scripts produce meaningful error messages differentiating the 126 and 127 cases. The
    245 distinction between exit codes 126 and 127 is based on KornShell practice that uses 127 when all attempts to <i>exec</i> the
    246 utility fail with [ENOENT], and uses 126 when any attempt to <i>exec</i> the utility fails for any other reason.</p>
    247 <p>Since the <b>-v</b> and <b>-V</b> options of <i>command</i> produce output in relation to the current shell execution
    248 environment, <i>command</i> is generally provided as a shell regular built-in. If it is called in a subshell or separate utility
    249 execution environment, such as one of the following:</p>
    250 <pre>
    251 <tt>(PATH=foo command -v)
    252  nohup command -v
    253 </tt></pre>
    254 <p>it does not necessarily produce correct results. For example, when called with <a href=
    255 "../utilities/nohup.html"><i>nohup</i></a> or an <i>exec</i> function, in a separate utility execution environment, most
    256 implementations are not able to identify aliases, functions, or special built-ins.</p>
    257 <p>Two types of regular built-ins could be encountered on a system and these are described separately by <i>command</i>. The
    258 description of command search in <a href="../utilities/V3_chap02.html#tag_19_09_01_04"><i>2.9.1.4 Command Search and
    259 Execution</i></a> allows for a standard utility to be implemented as a regular built-in as long as it is found in the appropriate
    260 place in a <i>PATH</i> search. So, for example, <i>command</i> <b>-v</b> <i>true</i> might yield <b>/bin/true</b> or some similar
    261 pathname. Other implementation-defined utilities that are not defined by this volume of POSIX.1-2024 might exist only as built-ins
    262 and have no pathname associated with them. These produce output identified as (regular) built-ins. Applications encountering these
    263 are not able to count on <i>exec</i>ing them, using them with <a href="../utilities/nohup.html"><i>nohup</i></a>, overriding them
    264 with a different <i>PATH ,</i> and so on.</p>
    265 <p>The <i>command</i> utility takes on the expansion behavior of the command that it is wrapping. Therefore, in</p>
    266 <pre>
    267 <tt>command command export a=~
    268 </tt></pre>
    269 <p><i>command</i> is recognized as a declaration utility, and the command sets the variable <i>a</i> to the value of <tt>$HOME</tt>
    270 because it performs tilde-expansion of an assignment context; while</p>
    271 <pre>
    272 <tt>command echo a=~
    273 </tt></pre>
    274 outputs the literal string <tt>"a=~"</tt> because regular expansion can only perform tilde-expansion at the beginning of the word.
    275 However, the shell need only perform lexical analysis of the next argument when deciding if command should be treated as a
    276 declaration utility; therefore, with:
    277 <pre>
    278 <tt>var=export; command $var a=~
    279 </tt></pre>
    280 <p>and</p>
    281 <pre>
    282 <tt>command -- export a=~
    283 </tt></pre>
    284 <p>it is unspecified whether the word <tt>a=~</tt> is handled in an assignment context or as a regular expansion.</p>
    285 </blockquote>
    286 <h4 class="mansect"><a name="tag_20_22_17" id="tag_20_22_17"></a>EXAMPLES</h4>
    287 <blockquote>
    288 <ol>
    289 <li>
    290 <p>Make a version of <a href="../utilities/cd.html"><i>cd</i></a> that always prints out the new working directory exactly
    291 once:</p>
    292 <pre>
    293 <tt>cd() {
    294     command cd "$@" &gt;/dev/null
    295     pwd
    296 }
    297 </tt></pre></li>
    298 <li>
    299 <p>Start off a &quot;secure shell script&quot; in which the script avoids being spoofed by its parent:</p>
    300 <pre>
    301 <tt>IFS='
    302 '
    303 #    The preceding value should be &lt;space&gt;&lt;tab&gt;&lt;newline&gt;.
    304 #    Set IFS to its default value.
    305 <br>
    306 \unalias -a
    307 #    Unset all possible aliases.
    308 #    Note that unalias is escaped to prevent an alias
    309 #    being used for unalias.
    310 <br>
    311 unset -f command
    312 #    Ensure command is not a user function.
    313 <br>
    314 PATH="$(command -p getconf PATH):$PATH"
    315 #    Put on a reliable PATH prefix.
    316 <br>
    317 #    ...
    318 </tt></pre>
    319 <p>At this point, given correct permissions on the directories called by <i>PATH ,</i> the script has the ability to ensure that
    320 any utility it calls is the intended one. It is being very cautious because it assumes that implementation extensions may be
    321 present that would allow user functions to exist when it is invoked; this capability is not specified by this volume of
    322 POSIX.1-2024, but it is not prohibited as an extension. For example, the <i>ENV</i> variable precedes the invocation of the script
    323 with a user start-up script. Such a script could define functions to spoof the application.</p>
    324 </li>
    325 </ol>
    326 </blockquote>
    327 <h4 class="mansect"><a name="tag_20_22_18" id="tag_20_22_18"></a>RATIONALE</h4>
    328 <blockquote>
    329 <p>Since <i>command</i> is a regular built-in utility it is always found prior to the <i>PATH</i> search.</p>
    330 <p>There is nothing in the description of <i>command</i> that implies the command line is parsed any differently from that of any
    331 other simple command. For example:</p>
    332 <pre>
    333 <tt>command a | b ; c
    334 </tt></pre>
    335 <p>is not parsed in any special way that causes <tt>'|'</tt> or <tt>';'</tt> to be treated other than a pipe operator or
    336 &lt;semicolon&gt; or that prevents function lookup on <b>b</b> or <b>c</b>. However, some implementations extend the shell's
    337 assignment syntax, for example to allow an array to be populated with a single assignment, and in order for such an extension to be
    338 usable in assignments specified as arguments to <a href="../utilities/export.html"><i>export</i></a> and <a href=
    339 "../utilities/readonly.html"><i>readonly</i></a> these shells have those utility names as separate tokens in their grammar. When
    340 <i>command</i> is used to execute these utilities it also needs to be a separate token in the grammar so that the same extended
    341 assignment syntax can still be recognized in this case. This standard only permits an extension of this nature when the input to
    342 the shell would contain a syntax error according to the standard grammar, and therefore it cannot affect how <tt>'|'</tt> and
    343 <tt>';'</tt> are parsed in the example above. Note that although <i>command</i> can be a separate token in the shell's grammar, it
    344 cannot be a reserved word since <i>command</i> is a candidate for alias substitution whereas reserved words are not (see <a href=
    345 "../utilities/V3_chap02.html#tag_19_03_01"><i>2.3.1 Alias Substitution</i></a> ).</p>
    346 <p>The <i>command</i> utility is somewhat similar to the Eighth Edition shell <i>builtin</i> command, but since <i>command</i> also
    347 goes to the file system to search for utilities, the name <i>builtin</i> would not be intuitive.</p>
    348 <p>The <i>command</i> utility is most likely to be provided as a regular built-in. It is not listed as a special built-in for the
    349 following reasons:</p>
    350 <ul>
    351 <li>
    352 <p>The removal of exportable functions made the special precedence of a special built-in unnecessary.</p>
    353 </li>
    354 <li>
    355 <p>A special built-in has special properties (see <a href="../utilities/V3_chap02.html#tag_19_15"><i>2.15 Special Built-In
    356 Utilities</i></a> ) that were inappropriate for invoking other utilities. For example, two commands such as:</p>
    357 <pre>
    358 <tt>date &gt; </tt><i>unwritable-file</i><tt>
    359 <br>
    360 command date &gt; </tt><i>unwritable-file</i><tt>
    361 </tt></pre>
    362 <p>would have entirely different results; in a non-interactive script, the former would continue to execute the next command, the
    363 latter would abort. Introducing this semantic difference along with suppressing functions was seen to be non-intuitive.</p>
    364 </li>
    365 </ul>
    366 <p>The <b>-p</b> option is present because it is useful to be able to ensure a safe path search that finds all the standard
    367 utilities. This search might not be identical to the one that occurs through one of the <i>exec</i> functions (as defined in the
    368 System Interfaces volume of POSIX.1-2024) when <i>PATH</i> is unset. At the very least, this feature is required to allow the
    369 script to access the correct version of <a href="../utilities/getconf.html"><i>getconf</i></a> so that the value of the default
    370 path can be accurately retrieved.</p>
    371 <p>The <i>command</i> <b>-v</b> and <b>-V</b> options were added to satisfy requirements from users that are currently accomplished
    372 by three different historical utilities: <a href="../utilities/type.html"><i>type</i></a> in the System V shell, <i>whence</i> in
    373 the KornShell, and <i>which</i> in the C shell. Since there is no historical agreement on how and what to accomplish here, the
    374 POSIX <i>command</i> utility was enhanced and the historical utilities were left unmodified. The C shell <i>which</i> merely
    375 conducts a path search. The KornShell <i>whence</i> is more elaborate—in addition to the categories required by POSIX, it also
    376 reports on tracked aliases, exported aliases, and undefined functions.</p>
    377 <p>The output format of <b>-V</b> was left mostly unspecified because human users are its only audience. Applications should not be
    378 written to care about this information; they can use the output of <b>-v</b> to differentiate between various types of commands,
    379 but the additional information that may be emitted by the more verbose <b>-V</b> is not needed and should not be arbitrarily
    380 constrained in its verbosity or localization for application parsing reasons.</p>
    381 </blockquote>
    382 <h4 class="mansect"><a name="tag_20_22_19" id="tag_20_22_19"></a>FUTURE DIRECTIONS</h4>
    383 <blockquote>
    384 <p>If this utility is directed to display a pathname that contains any bytes that have the encoded value of a &lt;newline&gt;
    385 character when &lt;newline&gt; is a terminator or separator in the output format being used, implementations are encouraged to
    386 treat this as an error. A future version of this standard may require implementations to treat this as an error.</p>
    387 </blockquote>
    388 <h4 class="mansect"><a name="tag_20_22_20" id="tag_20_22_20"></a>SEE ALSO</h4>
    389 <blockquote>
    390 <p><a href="../utilities/V3_chap02.html#tag_19_09_01_04"><i>2.9.1.4 Command Search and Execution</i></a> , <a href=
    391 "../utilities/V3_chap02.html#tag_19_09_01_01"><i>2.9.1.1 Order of Processing</i></a> , <a href=
    392 "../utilities/V3_chap02.html#tag_19_13"><i>2.13 Shell Execution Environment</i></a> , <a href=
    393 "../utilities/V3_chap02.html#tag_19_15"><i>2.15 Special Built-In Utilities</i></a> , <a href="../utilities/sh.html#"><i>sh</i></a>
    394 , <a href="../utilities/type.html#"><i>type</i></a></p>
    395 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href=
    396 "../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a></p>
    397 <p>XSH <a href="../functions/exec.html#tag_17_129"><i>exec</i></a></p>
    398 </blockquote>
    399 <h4 class="mansect"><a name="tag_20_22_21" id="tag_20_22_21"></a>CHANGE HISTORY</h4>
    400 <blockquote>
    401 <p>First released in Issue 4.</p>
    402 </blockquote>
    403 <h4 class="mansect"><a name="tag_20_22_22" id="tag_20_22_22"></a>Issue 7</h4>
    404 <blockquote>
    405 <p>Austin Group Interpretation 1003.1-2001 #196 is applied, changing the SYNOPSIS to allow <b>-p</b> to be used with <b>-v</b> (or
    406 <b>-V</b>).</p>
    407 <p>SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.</p>
    408 <p>The <i>command</i> utility is moved from the User Portability Utilities option to the Base. User Portability Utilities is now an
    409 option for interactive utilities.</p>
    410 <p>The APPLICATION USAGE and EXAMPLES are revised to replace the non-standard <a href=
    411 "../utilities/getconf.html"><i>getconf</i></a>_CS_PATH with <a href="../utilities/getconf.html"><i>getconf</i></a> <i>PATH
    412 .</i></p>
    413 </blockquote>
    414 <h4 class="mansect"><a name="tag_20_22_23" id="tag_20_22_23"></a>Issue 8</h4>
    415 <blockquote>
    416 <p>Austin Group Defect 251 is applied, encouraging implementations to report an error if a utility is directed to display a
    417 pathname that contains any bytes that have the encoded value of a &lt;newline&gt; character when &lt;newline&gt; is a terminator or
    418 separator in the output format being used.</p>
    419 <p>Austin Group Defects 351 and 1393 are applied, requiring <i>command</i> to be a declaration utility if the first argument passed
    420 to the utility is recognized as a declaration utility.</p>
    421 <p>Austin Group Defect 854 is applied, adding a note to the APPLICATION USAGE section that this utility is required to be
    422 intrinsic.</p>
    423 <p>Austin Group Defect 1117 is applied, changing &quot;implementation-defined&quot; to &quot;implementation-provided&quot;.</p>
    424 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p>
    425 <p>Austin Group Defect 1161 is applied, changing &quot;Utilities&quot; to &quot;Executable utilities&quot; in the descriptions of the <b>-v</b> and
    426 <b>-V</b> options.</p>
    427 <p>Austin Group Defect 1431 is applied, changing &quot;item 1b&quot; to &quot;item 1c&quot;.</p>
    428 <p>Austin Group Defect 1586 is applied, adding the <a href="../utilities/timeout.html"><i>timeout</i></a> utility.</p>
    429 <p>Austin Group Defect 1594 is applied, changing the APPLICATION USAGE section.</p>
    430 <p>Austin Group Defect 1637 is applied, clarifying that (when no options are specified) <i>command_name</i> is not subject to alias
    431 substitution nor recognized as a reserved word.</p>
    432 </blockquote>
    433 <div class="box"><em>End of informative text.</em></div>
    434 <hr>
    435 <p>&nbsp;</p>
    436 <a href="#top"><span class="topOfPage">return to top of page</span></a><br>
    437 <hr size="2" noshade>
    438 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br>
    439 POSIX™ is a Trademark of The IEEE.<br>
    440 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br>
    441 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
    442 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a>
    443 ]</font></center>
    444 <hr size="2" noshade>
    445 <div class="NAVHEADER">
    446 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
    447 <tr class="nav">
    448 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/comm.html" accesskey="P">&lt;&lt;&lt;
    449 Previous</a></td>
    450 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
    451 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/compress.html" accesskey="N">Next
    452 &gt;&gt;&gt;</a></td>
    453 </tr>
    454 </table>
    455 <hr align="left" width="100%"></div>
    456 </body>
    457 </html>