man-pages/man1p/uudecode.1p

180 lines
6.2 KiB
Groff

.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
.TH "UUDECODE" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" uudecode
.SH NAME
uudecode \- decode a binary file
.SH SYNOPSIS
.LP
\fBuudecode\fP \fB[\fP\fB-o\fP \fIoutfile\fP\fB][\fP\fIfile\fP\fB]\fP\fB\fP
.SH DESCRIPTION
.LP
The \fIuudecode\fP utility shall read a file, or standard input if
no file is specified, that includes data created by the \fIuuencode\fP
utility. The \fIuudecode\fP utility shall scan the input file, searching
for
data compatible with one of the formats specified in \fIuuencode\fP,
and attempt to
create or overwrite the file described by the data (or overridden
by the \fB-o\fP option). The pathname shall be contained in the
data or specified by the \fB-o\fP 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 \fIumask\fP() ), shall
not affect the file being produced.
.LP
If the pathname of the file to be produced exists, and the user does
not have write permission on that file, \fIuudecode\fP
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.
.LP
If the input data was produced by \fIuuencode\fP on a system with
a different number
of bits per byte than on the target system, the results of \fIuudecode\fP
are unspecified.
.SH OPTIONS
.LP
The \fIuudecode\fP utility shall conform to the Base Definitions volume
of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
.LP
The following option shall be supported by the implementation:
.TP 7
\fB-o\ \fP \fIoutfile\fP
A pathname of a file that shall be used instead of any pathname contained
in the input data. Specifying an \fIoutfile\fP
option-argument of \fB/dev/stdout\fP shall indicate standard output.
.sp
.SH OPERANDS
.LP
The following operand shall be supported:
.TP 7
\fIfile\fP
The pathname of a file containing the output of \fIuuencode\fP.
.sp
.SH STDIN
.LP
See the INPUT FILES section.
.SH INPUT FILES
.LP
The input files shall be files containing the output of \fIuuencode\fP.
.SH ENVIRONMENT VARIABLES
.LP
The following environment variables shall affect the execution of
\fIuudecode\fP:
.TP 7
\fILANG\fP
Provide a default value for the internationalization variables that
are unset or null. (See the Base Definitions volume of
IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
for
the precedence of internationalization variables used to determine
the values of locale categories.)
.TP 7
\fILC_ALL\fP
If set to a non-empty string value, override the values of all the
other internationalization variables.
.TP 7
\fILC_CTYPE\fP
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).
.TP 7
\fILC_MESSAGES\fP
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard
error.
.TP 7
\fINLSPATH\fP
Determine the location of message catalogs for the processing of \fILC_MESSAGES
\&.\fP
.sp
.SH ASYNCHRONOUS EVENTS
.LP
Default.
.SH STDOUT
.LP
If the file data header encoded by \fIuuencode\fP is \fB-\fP or \fB/dev/stdout\fP,
or the \fB-o\fP \fB/dev/stdout\fP option overrides the file data,
the standard output shall be in the same format as the file
originally encoded by \fIuuencode\fP. Otherwise, the standard output
shall not be
used.
.SH STDERR
.LP
The standard error shall be used only for diagnostic messages.
.SH OUTPUT FILES
.LP
The output file shall be in the same format as the file originally
encoded by \fIuuencode\fP.
.SH EXTENDED DESCRIPTION
.LP
None.
.SH EXIT STATUS
.LP
The following exit values shall be returned:
.TP 7
\ 0
Successful completion.
.TP 7
>0
An error occurred.
.sp
.SH CONSEQUENCES OF ERRORS
.LP
Default.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
The user who is invoking \fIuudecode\fP must have write permission
on any file being created.
.LP
The output of \fIuuencode\fP 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.
.SH EXAMPLES
.LP
None.
.SH RATIONALE
.LP
Input files are not necessarily text files, as stated by an early
proposal. Although the \fIuuencode\fP output is a text file, that
output could have been wrapped within another file or
mail message that is not a text file.
.LP
The \fB-o\fP 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.
.LP
In early drafts, the [ \fB-o\fP \fIoutfile\fP] option-argument allowed
the use of \fB-\fP to mean standard output. The symbol
\fB-\fP has only been used previously in IEEE\ Std\ 1003.1-2001 as
a standard input indicator. The developers of the
standard did not wish to overload the meaning of \fB-\fP in this manner.
The \fB/dev/stdout\fP concept exists on most modern
systems. The \fB/dev/stdout\fP syntax does not refer to a new special
file. It is just a magic cookie to specify standard
output.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fIumask\fP() , \fIuuencode\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .