Un outil pour savoir si une commande est posix - retour accueil
git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |
uudecode.html (14510B)
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>uudecode</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/uucp.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/uuencode.html" accesskey="N">Next 19 >>></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="uudecode" id="uudecode"></a> <a name="tag_20_141" id="tag_20_141"></a><!-- uudecode --> 29 <h4 class="mansect"><a name="tag_20_141_01" id="tag_20_141_01"></a>NAME</h4> 30 <blockquote>uudecode — decode a binary file</blockquote> 31 <h4 class="mansect"><a name="tag_20_141_02" id="tag_20_141_02"></a>SYNOPSIS</h4> 32 <blockquote class="synopsis"> 33 <p><code><tt>uudecode</tt> <b>[</b><tt>-o</tt> <i>outfile</i><b>] [</b><i>file</i><b>]</b></code></p> 34 </blockquote> 35 <h4 class="mansect"><a name="tag_20_141_03" id="tag_20_141_03"></a>DESCRIPTION</h4> 36 <blockquote> 37 <p>The <i>uudecode</i> utility shall read a file, or standard input if no file is specified, that includes data created by the 38 <a href="../utilities/uuencode.html"><i>uuencode</i></a> utility. The <i>uudecode</i> utility shall scan the input file, searching 39 for data compatible with one of the formats specified in <a href="../utilities/uuencode.html"><i>uuencode</i></a>, and determine 40 the pathname for the output file from the <b>-o</b> option if given, otherwise from the input data. If the pathname for the output 41 file is either of the magic cookies <b>-</b> or <b>/dev/stdout</b>, <i>uudecode</i> shall write the decoded file to standard 42 output, otherwise it shall attempt to create or overwrite the file named by the pathname. The file access permission bits and 43 contents for the file to be produced shall be contained in the input data. The mode bits of the created file (other than standard 44 output) shall be set from the file access permission bits contained in the data; that is, other attributes of the mode, including 45 the file mode creation mask (see <a href="../utilities/umask.html"><i>umask</i></a>), shall not affect the file being produced. If 46 either of the <i>op</i> characters <tt>'+'</tt> and <tt>'-'</tt> (see <a href="../utilities/chmod.html"><i>chmod</i></a>) are 47 specified in symbolic mode, the initial mode on which those operations are based is unspecified.</p> 48 <p>If the pathname of the file resolves to an existing file and the user does not have write permission on that file, 49 <i>uudecode</i> shall terminate with an error. If the pathname of the file resolves to an existing file and the user has write 50 permission on that file, the existing file shall be overwritten and, if possible, the mode bits of the file (other than standard 51 output) shall be set as described above; if the mode bits cannot be set, <i>uudecode</i> shall not treat this as an error.</p> 52 <p>If the input data was produced by <a href="../utilities/uuencode.html"><i>uuencode</i></a> on a system with a different number 53 of bits per byte than on the target system, the results of <i>uudecode</i> are unspecified.</p> 54 </blockquote> 55 <h4 class="mansect"><a name="tag_20_141_04" id="tag_20_141_04"></a>OPTIONS</h4> 56 <blockquote> 57 <p>The <i>uudecode</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 option shall be supported by the implementation:</p> 60 <dl compact> 61 <dd></dd> 62 <dt><b>-o </b><i>outfile</i></dt> 63 <dd>A pathname of a file that shall be used instead of any pathname contained in the input data. Specifying an <i>outfile</i> 64 option-argument of <b>-</b> or <b>/dev/stdout</b> shall indicate standard output.</dd> 65 </dl> 66 </blockquote> 67 <h4 class="mansect"><a name="tag_20_141_05" id="tag_20_141_05"></a>OPERANDS</h4> 68 <blockquote> 69 <p>The following operand shall be supported:</p> 70 <dl compact> 71 <dd></dd> 72 <dt><i>file</i></dt> 73 <dd>The pathname of a file containing the output of <a href="../utilities/uuencode.html"><i>uuencode</i></a>.</dd> 74 </dl> 75 </blockquote> 76 <h4 class="mansect"><a name="tag_20_141_06" id="tag_20_141_06"></a>STDIN</h4> 77 <blockquote> 78 <p>See the INPUT FILES section.</p> 79 </blockquote> 80 <h4 class="mansect"><a name="tag_20_141_07" id="tag_20_141_07"></a>INPUT FILES</h4> 81 <blockquote> 82 <p>The input files shall be files containing the output of <a href="../utilities/uuencode.html"><i>uuencode</i></a>.</p> 83 </blockquote> 84 <h4 class="mansect"><a name="tag_20_141_08" id="tag_20_141_08"></a>ENVIRONMENT VARIABLES</h4> 85 <blockquote> 86 <p>The following environment variables shall affect the execution of <i>uudecode</i>:</p> 87 <dl compact> 88 <dd></dd> 89 <dt><i>LANG</i></dt> 90 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href= 91 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization 92 variables used to determine the values of locale categories.)</dd> 93 <dt><i>LC_ALL</i></dt> 94 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd> 95 <dt><i>LC_CTYPE</i></dt> 96 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as 97 opposed to multi-byte characters in arguments and input files).</dd> 98 <dt><i>LC_MESSAGES</i></dt> 99 <dd><br> 100 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd> 101 <dt><i>NLSPATH</i></dt> 102 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 103 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border= 104 "0"></dd> 105 </dl> 106 </blockquote> 107 <h4 class="mansect"><a name="tag_20_141_09" id="tag_20_141_09"></a>ASYNCHRONOUS EVENTS</h4> 108 <blockquote> 109 <p>Default.</p> 110 </blockquote> 111 <h4 class="mansect"><a name="tag_20_141_10" id="tag_20_141_10"></a>STDOUT</h4> 112 <blockquote> 113 <p>If the pathname specified for the output file is <b>-</b> or <b>/dev/stdout</b>, the standard output shall be in the same format 114 as the file originally encoded by <a href="../utilities/uuencode.html"><i>uuencode</i></a>. Otherwise, the standard output shall 115 not be used.</p> 116 </blockquote> 117 <h4 class="mansect"><a name="tag_20_141_11" id="tag_20_141_11"></a>STDERR</h4> 118 <blockquote> 119 <p>The standard error shall be used only for diagnostic messages.</p> 120 </blockquote> 121 <h4 class="mansect"><a name="tag_20_141_12" id="tag_20_141_12"></a>OUTPUT FILES</h4> 122 <blockquote> 123 <p>The output file shall be in the same format as the file originally encoded by <a href= 124 "../utilities/uuencode.html"><i>uuencode</i></a>.</p> 125 </blockquote> 126 <h4 class="mansect"><a name="tag_20_141_13" id="tag_20_141_13"></a>EXTENDED DESCRIPTION</h4> 127 <blockquote> 128 <p>None.</p> 129 </blockquote> 130 <h4 class="mansect"><a name="tag_20_141_14" id="tag_20_141_14"></a>EXIT STATUS</h4> 131 <blockquote> 132 <p>The following exit values shall be returned:</p> 133 <dl compact> 134 <dd></dd> 135 <dt> 0</dt> 136 <dd>Successful completion.</dd> 137 <dt>>0</dt> 138 <dd>An error occurred.</dd> 139 </dl> 140 </blockquote> 141 <h4 class="mansect"><a name="tag_20_141_15" id="tag_20_141_15"></a>CONSEQUENCES OF ERRORS</h4> 142 <blockquote> 143 <p>Default.</p> 144 </blockquote> 145 <hr> 146 <div class="box"><em>The following sections are informative.</em></div> 147 <h4 class="mansect"><a name="tag_20_141_16" id="tag_20_141_16"></a>APPLICATION USAGE</h4> 148 <blockquote> 149 <p>The user who is invoking <i>uudecode</i> must have write permission on any file being created.</p> 150 <p>The output of <a href="../utilities/uuencode.html"><i>uuencode</i></a> is essentially an encoded bit stream that is not 151 cognizant of byte boundaries. It is possible that a 9-bit byte target machine can process input from an 8-bit source, if it is 152 aware of the requirement, but the reverse is unlikely to be satisfying. Of course, the only data that is meaningful for such a 153 transfer between architectures is generally character data.</p> 154 <p>In order to create an output file named <b>-</b>, it needs to be specified using an alternative pathname, for example, <b>-o</b> 155 <b>./-</b>, since <b>-</b> alone is considered a magic cookie by <i>uudecode</i>. Likewise, in order to write to an output file 156 named <b>/dev/stdout</b> it also needs to be specified as, for example, <b>-o</b> <b>///dev/stdout</b>.</p> 157 </blockquote> 158 <h4 class="mansect"><a name="tag_20_141_17" id="tag_20_141_17"></a>EXAMPLES</h4> 159 <blockquote> 160 <p>None.</p> 161 </blockquote> 162 <h4 class="mansect"><a name="tag_20_141_18" id="tag_20_141_18"></a>RATIONALE</h4> 163 <blockquote> 164 <p>Input files are not necessarily text files, as stated by an early proposal. Although the <a href= 165 "../utilities/uuencode.html"><i>uuencode</i></a> output is a text file, that output could have been wrapped within another file or 166 mail message that is not a text file.</p> 167 <p>The <b>-o</b> option is not historical practice, but was added at the request of WG15 so that the user could override the target 168 pathname without having to edit the input data itself.</p> 169 <p>In early drafts, the [<b>-o</b> <i>outfile</i>] option-argument allowed the use of <b>-</b> to mean standard output. The 170 standard developers did not wish to overload the meaning of <b>-</b> in this manner, resulting in previous versions only using 171 <b>/dev/stdout</b> for this purpose. POSIX.1-2024 now allows it as most implementations were already supporting <b>-</b> as an 172 extension. The file <b>/dev/stdout</b> exists as a special file on most modern systems. However, the <b>/dev/stdout</b> syntax in 173 <i>uudecode</i> does not refer to a new file. It is just a magic cookie to specify standard output.</p> 174 </blockquote> 175 <h4 class="mansect"><a name="tag_20_141_19" id="tag_20_141_19"></a>FUTURE DIRECTIONS</h4> 176 <blockquote> 177 <p>If this utility is directed to create a new directory entry that contains any bytes that have the encoded value of a 178 <newline> character, implementations are encouraged to treat this as an error. A future version of this standard may require 179 implementations to treat this as an error.</p> 180 </blockquote> 181 <h4 class="mansect"><a name="tag_20_141_20" id="tag_20_141_20"></a>SEE ALSO</h4> 182 <blockquote> 183 <p><a href="../utilities/chmod.html#tag_20_17"><i>chmod</i></a> , <a href="../utilities/umask.html#tag_20_132"><i>umask</i></a> , 184 <a href="../utilities/uuencode.html#"><i>uuencode</i></a></p> 185 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href= 186 "../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a></p> 187 </blockquote> 188 <h4 class="mansect"><a name="tag_20_141_21" id="tag_20_141_21"></a>CHANGE HISTORY</h4> 189 <blockquote> 190 <p>First released in Issue 4.</p> 191 </blockquote> 192 <h4 class="mansect"><a name="tag_20_141_22" id="tag_20_141_22"></a>Issue 6</h4> 193 <blockquote> 194 <p>This utility is marked as part of the User Portability Utilities option.</p> 195 <p>The <b>-o</b> <i>outfile</i> option is added, as specified in the IEEE P1003.2b draft standard.</p> 196 <p>The normative text is reworded to avoid use of the term "must" for application requirements.</p> 197 <p>IEEE Std 1003.1-2001/Cor 2-2004, item XCU/TC2/D6/35 is applied, clarifying in the DESCRIPTION that the initial 198 mode used if either of the <i>op</i> characters is <tt>'+'</tt> or <tt>'-'</tt> is unspecified.</p> 199 </blockquote> 200 <h4 class="mansect"><a name="tag_20_141_23" id="tag_20_141_23"></a>Issue 7</h4> 201 <blockquote> 202 <p>The <i>uudecode</i> utility is moved from the User Portability Utilities option to the Base. User Portability Utilities is now 203 an option for interactive utilities.</p> 204 <p>SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.</p> 205 <p>POSIX.1-2008, Technical Corrigendum 2, XCU/TC2-2008/0201 [635] is applied.</p> 206 </blockquote> 207 <h4 class="mansect"><a name="tag_20_141_24" id="tag_20_141_24"></a>Issue 8</h4> 208 <blockquote> 209 <p>Austin Group Defect 251 is applied, encouraging implementations to disallow the creation of filenames containing any bytes that 210 have the encoded value of a <newline> character.</p> 211 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p> 212 <p>Austin Group Defect 1544 is applied, changing the <b>-o</b> option to require that an option-argument of <b>-</b> is treated as 213 meaning standard output.</p> 214 </blockquote> 215 <div class="box"><em>End of informative text.</em></div> 216 <hr> 217 <p> </p> 218 <a href="#top"><span class="topOfPage">return to top of page</span></a><br> 219 <hr size="2" noshade> 220 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br> 221 POSIX™ is a Trademark of The IEEE.<br> 222 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br> 223 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href= 224 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a> 225 ]</font></center> 226 <hr size="2" noshade> 227 <div class="NAVHEADER"> 228 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 229 <tr class="nav"> 230 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/uucp.html" accesskey="P"><<< 231 Previous</a></td> 232 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 233 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/uuencode.html" accesskey="N">Next 234 >>></a></td> 235 </tr> 236 </table> 237 <hr align="left" width="100%"></div> 238 </body> 239 </html>