1UUDECODE(P) POSIX Programmer's Manual UUDECODE(P)
2
3
4
6 uudecode - decode a binary file
7
9 uudecode [-o outfile][file]
10
12 The uudecode utility shall read a file, or standard input if no file is
13 specified, that includes data created by the uuencode utility. The
14 uudecode utility shall scan the input file, searching for data compati‐
15 ble with one of the formats specified in uuencode, and attempt to cre‐
16 ate or overwrite the file described by the data (or overridden by the
17 -o option). The pathname shall be contained in the data or specified by
18 the -o option. The file access permission bits and contents for the
19 file to be produced shall be contained in that data. The mode bits of
20 the created file (other than standard output) shall be set from the
21 file access permission bits contained in the data; that is, other
22 attributes of the mode, including the file mode creation mask (see
23 umask() ), shall not affect the file being produced.
24
25 If the pathname of the file to be produced exists, and the user does
26 not have write permission on that file, uudecode shall terminate with
27 an error. If the pathname of the file to be produced exists, and the
28 user has write permission on that file, the existing file shall be
29 overwritten.
30
31 If the input data was produced by uuencode on a system with a different
32 number of bits per byte than on the target system, the results of uude‐
33 code are unspecified.
34
36 The uudecode utility shall conform to the Base Definitions volume of
37 IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
38
39 The following option shall be supported by the implementation:
40
41 -o outfile
42 A pathname of a file that shall be used instead of any pathname
43 contained in the input data. Specifying an outfile option-argu‐
44 ment of /dev/stdout shall indicate standard output.
45
46
48 The following operand shall be supported:
49
50 file The pathname of a file containing the output of uuencode.
51
52
54 See the INPUT FILES section.
55
57 The input files shall be files containing the output of uuencode.
58
60 The following environment variables shall affect the execution of uude‐
61 code:
62
63 LANG Provide a default value for the internationalization variables
64 that are unset or null. (See the Base Definitions volume of
65 IEEE Std 1003.1-2001, Section 8.2, Internationalization Vari‐
66 ables for the precedence of internationalization variables used
67 to determine the values of locale categories.)
68
69 LC_ALL If set to a non-empty string value, override the values of all
70 the other internationalization variables.
71
72 LC_CTYPE
73 Determine the locale for the interpretation of sequences of
74 bytes of text data as characters (for example, single-byte as
75 opposed to multi-byte characters in arguments and input files).
76
77 LC_MESSAGES
78 Determine the locale that should be used to affect the format
79 and contents of diagnostic messages written to standard error.
80
81 NLSPATH
82 Determine the location of message catalogs for the processing of
83 LC_MESSAGES .
84
85
87 Default.
88
90 If the file data header encoded by uuencode is - or /dev/stdout, or the
91 -o /dev/stdout option overrides the file data, the standard output
92 shall be in the same format as the file originally encoded by uuencode.
93 Otherwise, the standard output shall not be used.
94
96 The standard error shall be used only for diagnostic messages.
97
99 The output file shall be in the same format as the file originally
100 encoded by uuencode.
101
103 None.
104
106 The following exit values shall be returned:
107
108 0 Successful completion.
109
110 >0 An error occurred.
111
112
114 Default.
115
116 The following sections are informative.
117
119 The user who is invoking uudecode must have write permission on any
120 file being created.
121
122 The output of uuencode is essentially an encoded bit stream that is not
123 cognizant of byte boundaries. It is possible that a 9-bit byte target
124 machine can process input from an 8-bit source, if it is aware of the
125 requirement, but the reverse is unlikely to be satisfying. Of course,
126 the only data that is meaningful for such a transfer between architec‐
127 tures is generally character data.
128
130 None.
131
133 Input files are not necessarily text files, as stated by an early pro‐
134 posal. Although the uuencode output is a text file, that output could
135 have been wrapped within another file or mail message that is not a
136 text file.
137
138 The -o option is not historical practice, but was added at the request
139 of WG15 so that the user could override the target pathname without
140 having to edit the input data itself.
141
142 In early drafts, the [ -o outfile] option-argument allowed the use of -
143 to mean standard output. The symbol - has only been used previously in
144 IEEE Std 1003.1-2001 as a standard input indicator. The developers of
145 the standard did not wish to overload the meaning of - in this manner.
146 The /dev/stdout concept exists on most modern systems. The /dev/stdout
147 syntax does not refer to a new special file. It is just a magic cookie
148 to specify standard output.
149
151 None.
152
154 umask() , uuencode
155
157 Portions of this text are reprinted and reproduced in electronic form
158 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
159 -- Portable Operating System Interface (POSIX), The Open Group Base
160 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
161 Electrical and Electronics Engineers, Inc and The Open Group. In the
162 event of any discrepancy between this version and the original IEEE and
163 The Open Group Standard, the original IEEE and The Open Group Standard
164 is the referee document. The original Standard can be obtained online
165 at http://www.opengroup.org/unix/online.html .
166
167
168
169IEEE/The Open Group 2003 UUDECODE(P)