Files
2024-02-19 00:21:47 -05:00

265 lines
9.9 KiB
HTML

<!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 The Open Group, All Rights Reserved -->
<title>uudecode</title>
</head>
<body bgcolor="white">
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
</script>
<basefont size="3"> <a name="uudecode"></a> <a name="tag_04_162"></a><!-- uudecode -->
<!--header start-->
<center><font size="2">The Open Group Base Specifications Issue 6<br>
IEEE Std 1003.1-2001<br>
Copyright &copy; 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
<!--header end-->
<hr size="2" noshade>
<h4><a name="tag_04_162_01"></a>NAME</h4>
<blockquote>uudecode - decode a binary file</blockquote>
<h4><a name="tag_04_162_02"></a>SYNOPSIS</h4>
<blockquote class="synopsis">
<div class="box"><code><tt><sup>[<a href="javascript:open_code('UP')">UP</a>]</sup> <img src="../images/opt-start.gif" alt=
"[Option Start]" border="0"> uudecode</tt> <b>[</b><tt>-o</tt> <i>outfile</i><b>][</b><i>file</i><b>]</b><tt><img src=
"../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
</blockquote>
<h4><a name="tag_04_162_03"></a>DESCRIPTION</h4>
<blockquote>
<p>The <i>uudecode</i> utility shall read a file, or standard input if no file is specified, that includes data created by the <a
href="../utilities/uuencode.html"><i>uuencode</i></a> utility. The <i>uudecode</i> utility shall scan the input file, searching for
data compatible with one of the formats specified in <a href="../utilities/uuencode.html"><i>uuencode</i></a>, and attempt to
create or overwrite the file described by the data (or overridden by the <b>-o</b> option). The pathname shall be contained in the
data or specified by the <b>-o</b> option. The file access permission bits and contents for the file to be produced shall be
contained in that data. The mode bits of the created file (other than standard output) shall be set from the file access permission
bits contained in the data; that is, other attributes of the mode, including the file mode creation mask (see <a href=
"umask.html"><i>umask</i>()</a> ), shall not affect the file being produced.</p>
<p>If the pathname of the file to be produced exists, and the user does not have write permission on that file, <i>uudecode</i>
shall terminate with an error. If the pathname of the file to be produced exists, and the user has write permission on that file,
the existing file shall be overwritten.</p>
<p>If the input data was produced by <a href="../utilities/uuencode.html"><i>uuencode</i></a> on a system with a different number
of bits per byte than on the target system, the results of <i>uudecode</i> are unspecified.</p>
</blockquote>
<h4><a name="tag_04_162_04"></a>OPTIONS</h4>
<blockquote>
<p>The <i>uudecode</i> utility shall conform to the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href=
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p>
<p>The following option shall be supported by the implementation:</p>
<dl compact>
<dt><b>-o&nbsp;</b> <i>outfile</i></dt>
<dd>A pathname of a file that shall be used instead of any pathname contained in the input data. Specifying an <i>outfile</i>
option-argument of <b>/dev/stdout</b> shall indicate standard output.</dd>
</dl>
</blockquote>
<h4><a name="tag_04_162_05"></a>OPERANDS</h4>
<blockquote>
<p>The following operand shall be supported:</p>
<dl compact>
<dt><i>file</i></dt>
<dd>The pathname of a file containing the output of <a href="../utilities/uuencode.html"><i>uuencode</i></a>.</dd>
</dl>
</blockquote>
<h4><a name="tag_04_162_06"></a>STDIN</h4>
<blockquote>
<p>See the INPUT FILES section.</p>
</blockquote>
<h4><a name="tag_04_162_07"></a>INPUT FILES</h4>
<blockquote>
<p>The input files shall be files containing the output of <a href="../utilities/uuencode.html"><i>uuencode</i></a>.</p>
</blockquote>
<h4><a name="tag_04_162_08"></a>ENVIRONMENT VARIABLES</h4>
<blockquote>
<p>The following environment variables shall affect the execution of <i>uudecode</i>:</p>
<dl compact>
<dt><i>LANG</i></dt>
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
<dt><i>LC_ALL</i></dt>
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
<dt><i>LC_CTYPE</i></dt>
<dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
opposed to multi-byte characters in arguments and input files).</dd>
<dt><i>LC_MESSAGES</i></dt>
<dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard
error.</dd>
<dt><i>NLSPATH</i></dt>
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt=
"[Option End]" border="0"></dd>
</dl>
</blockquote>
<h4><a name="tag_04_162_09"></a>ASYNCHRONOUS EVENTS</h4>
<blockquote>
<p>Default.</p>
</blockquote>
<h4><a name="tag_04_162_10"></a>STDOUT</h4>
<blockquote>
<p>If the file data header encoded by <a href="../utilities/uuencode.html"><i>uuencode</i></a> is <b>-</b> or <b>/dev/stdout</b>,
or the <b>-o</b> <b>/dev/stdout</b> option overrides the file data, the standard output shall be in the same format as the file
originally encoded by <a href="../utilities/uuencode.html"><i>uuencode</i></a>. Otherwise, the standard output shall not be
used.</p>
</blockquote>
<h4><a name="tag_04_162_11"></a>STDERR</h4>
<blockquote>
<p>The standard error shall be used only for diagnostic messages.</p>
</blockquote>
<h4><a name="tag_04_162_12"></a>OUTPUT FILES</h4>
<blockquote>
<p>The output file shall be in the same format as the file originally encoded by <a href=
"../utilities/uuencode.html"><i>uuencode</i></a>.</p>
</blockquote>
<h4><a name="tag_04_162_13"></a>EXTENDED DESCRIPTION</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_04_162_14"></a>EXIT STATUS</h4>
<blockquote>
<p>The following exit values shall be returned:</p>
<dl compact>
<dt>&nbsp;0</dt>
<dd>Successful completion.</dd>
<dt>&gt;0</dt>
<dd>An error occurred.</dd>
</dl>
</blockquote>
<h4><a name="tag_04_162_15"></a>CONSEQUENCES OF ERRORS</h4>
<blockquote>
<p>Default.</p>
</blockquote>
<hr>
<div class="box"><em>The following sections are informative.</em></div>
<h4><a name="tag_04_162_16"></a>APPLICATION USAGE</h4>
<blockquote>
<p>The user who is invoking <i>uudecode</i> must have write permission on any file being created.</p>
<p>The output of <a href="../utilities/uuencode.html"><i>uuencode</i></a> is essentially an encoded bit stream that is not
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
aware of the requirement, but the reverse is unlikely to be satisfying. Of course, the only data that is meaningful for such a
transfer between architectures is generally character data.</p>
</blockquote>
<h4><a name="tag_04_162_17"></a>EXAMPLES</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_04_162_18"></a>RATIONALE</h4>
<blockquote>
<p>Input files are not necessarily text files, as stated by an early proposal. Although the <a href=
"../utilities/uuencode.html"><i>uuencode</i></a> output is a text file, that output could have been wrapped within another file or
mail message that is not a text file.</p>
<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
pathname without having to edit the input data itself.</p>
<p>In early drafts, the [ <b>-o</b> <i>outfile</i>] option-argument allowed the use of <b>-</b> to mean standard output. The symbol
<b>-</b> has only been used previously in IEEE&nbsp;Std&nbsp;1003.1-2001 as a standard input indicator. The developers of the
standard did not wish to overload the meaning of <b>-</b> in this manner. The <b>/dev/stdout</b> concept exists on most modern
systems. The <b>/dev/stdout</b> syntax does not refer to a new special file. It is just a magic cookie to specify standard
output.</p>
</blockquote>
<h4><a name="tag_04_162_19"></a>FUTURE DIRECTIONS</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_04_162_20"></a>SEE ALSO</h4>
<blockquote>
<p><a href="umask.html"><i>umask</i>()</a> , <a href="uuencode.html"><i>uuencode</i></a></p>
</blockquote>
<h4><a name="tag_04_162_21"></a>CHANGE HISTORY</h4>
<blockquote>
<p>First released in Issue 4.</p>
</blockquote>
<h4><a name="tag_04_162_22"></a>Issue 6</h4>
<blockquote>
<p>This utility is marked as part of the User Portability Utilities option.</p>
<p>The <b>-o</b> <i>outfile</i> option is added, as specified in the IEEE&nbsp;P1003.2b draft standard.</p>
<p>The normative text is reworded to avoid use of the term &quot;must&quot; for application requirements.</p>
</blockquote>
<div class="box"><em>End of informative text.</em></div>
<hr>
<hr size="2" noshade>
<center><font size="2"><!--footer start-->
UNIX &reg; is a registered Trademark of The Open Group.<br>
POSIX &reg; is a registered Trademark of The IEEE.<br>
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
]</font></center>
<!--footer end-->
<hr size="2" noshade>
</body>
</html>