UUDECODE(1)                POSIX Programmer's Manual               UUDECODE(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       uudecode -- decode a binary file

SSYYNNOOPPSSIISS
       uudecode [[-o _o_u_t_f_i_l_e]] [[_f_i_l_e]]

DDEESSCCRRIIPPTTIIOONN
       The _u_u_d_e_c_o_d_e utility shall read a file, or standard input if no file is
       specified, that includes data created by the _u_u_e_n_c_o_d_e utility. The
       _u_u_d_e_c_o_d_e utility shall scan the input file, searching for data
       compatible with one of the formats specified in _u_u_e_n_c_o_d_e, and attempt
       to create or overwrite the file described by the data (or overridden by
       the --oo option). The pathname shall be contained in the data or
       specified by the --oo 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 _u_m_a_s_k), shall not affect the file being produced. If either of the
       _o_p characters ''++'' and ''--'' (see _c_h_m_o_d) are specified in symbolic mode,
       the initial mode on which those operations are based is unspecified.

       If the pathname of the file resolves to an existing file and the user
       does not have write permission on that file, _u_u_d_e_c_o_d_e shall terminate
       with an error. If the pathname of the file resolves to an existing file
       and the user has write permission on that file, the existing file shall
       be overwritten and, if possible, the mode bits of the file (other than
       standard output) shall be set as described above; if the mode bits
       cannot be set, _u_u_d_e_c_o_d_e shall not treat this as an error.

       If the input data was produced by _u_u_e_n_c_o_d_e on a system with a different
       number of bits per byte than on the target system, the results of
       _u_u_d_e_c_o_d_e are unspecified.

OOPPTTIIOONNSS
       The _u_u_d_e_c_o_d_e utility shall conform to the Base Definitions volume of
       POSIX.1-2017, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s.

       The following option shall be supported by the implementation:

       --oo _o_u_t_f_i_l_e
                 A pathname of a file that shall be used instead of any
                 pathname contained in the input data. Specifying an _o_u_t_f_i_l_e
                 option-argument of //ddeevv//ssttddoouutt shall indicate standard
                 output.

OOPPEERRAANNDDSS
       The following operand shall be supported:

       _f_i_l_e      The pathname of a file containing the output of _u_u_e_n_c_o_d_e.

SSTTDDIINN
       See the INPUT FILES section.

IINNPPUUTT FFIILLEESS
       The input files shall be files containing the output of _u_u_e_n_c_o_d_e.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of
       _u_u_d_e_c_o_d_e:

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2017, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_T_Y_P_E  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).

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard
                 error.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       If the file data header encoded by _u_u_e_n_c_o_d_e is -- or //ddeevv//ssttddoouutt, or the
       --oo //ddeevv//ssttddoouutt option overrides the file data, the standard output
       shall be in the same format as the file originally encoded by _u_u_e_n_c_o_d_e.
       Otherwise, the standard output shall not be used.

SSTTDDEERRRR
       The standard error shall be used only for diagnostic messages.

OOUUTTPPUUTT FFIILLEESS
       The output file shall be in the same format as the file originally
       encoded by _u_u_e_n_c_o_d_e.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       None.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    Successful completion.

       >0    An error occurred.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       The user who is invoking _u_u_d_e_c_o_d_e must have write permission on any
       file being created.

       The output of _u_u_e_n_c_o_d_e 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.

EEXXAAMMPPLLEESS
       None.

RRAATTIIOONNAALLEE
       Input files are not necessarily text files, as stated by an early
       proposal. Although the _u_u_e_n_c_o_d_e output is a text file, that output
       could have been wrapped within another file or mail message that is not
       a text file.

       The --oo 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.

       In early drafts, the [--oo _o_u_t_f_i_l_e] option-argument allowed the use of --
       to mean standard output. The symbol -- has only been used previously in
       POSIX.1-2008 as a standard input indicator.  The standard developers
       did not wish to overload the meaning of -- in this manner. The
       //ddeevv//ssttddoouutt concept exists on most modern systems. The //ddeevv//ssttddoouutt
       syntax does not refer to a new special file. It is just a magic cookie
       to specify standard output.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _c_h_m_o_d, _u_m_a_s_k, _u_u_e_n_c_o_d_e

       The Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t
       _V_a_r_i_a_b_l_e_s, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 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 .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                          UUDECODE(1)
