uudecode

 

NAME

uudecode − decode a binary file

SYNOPSIS

uudecode [-o outfile][file]

DESCRIPTION

The uudecode utility shall read a file, or standard input if no file is specified, that includes data created by theuuencode utility. The uudecode utility shall scan the input file, searching for data compatible with one of the formats specified inuuencode, and attempt to create or overwrite the file described by the data (or overridden by the-o option). The pathname shall be contained in the data or specified by the-o 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 (seeumask() ), shall not affect the file being produced.

If the pathname of the file to be produced exists, and the user does not have write permission on that file,uudecode 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.

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

OPTIONS

The uudecode utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.

The following option shall be supported by the implementation:
-o 
outfile

A pathname of a file that shall be used instead of any pathname contained in the input data. Specifying anoutfile option-argument of /dev/stdout shall indicate standard output.

OPERANDS

The following operand shall be supported:

 

file

 

The pathname of a file containing the output of uuencode.

STDIN

See the INPUT FILES section.

INPUT FILES

The input files shall be files containing the output ofuuencode.

ENVIRONMENT VARIABLES

The following environment variables shall affect the execution ofuudecode:

 

LANG

 

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

 

LC_ALL

 

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

LC_CTYPE

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

LC_MESSAGES

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

NLSPATH

Determine the location of message catalogs for the processing ofLC_MESSAGES .

ASYNCHRONOUS EVENTS

Default.

STDOUT

If the file data header encoded by uuencode is - or /dev/stdout, or the -o /dev/stdout option overrides the file data, the standard output shall be in the same format as the file originally encoded byuuencode. Otherwise, the standard output shall not be used.

STDERR

The standard error shall be used only for diagnostic messages.

OUTPUT FILES

The output file shall be in the same format as the file originally encoded byuuencode.

EXTENDED DESCRIPTION

None.

EXIT STATUS

The following exit values shall be returned:

 

  0

 

Successful completion.

 
 

>0

 

An error occurred.

 

CONSEQUENCES OF ERRORS

Default.

The following sections are informative.

APPLICATION USAGE

The user who is invoking uudecode must have write permission on any file being created.

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

EXAMPLES

None.

RATIONALE

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

The -o 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 [ -ooutfile] option-argument allowed the use of - to mean standard output. The symbol- 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- in this manner. The /dev/stdout concept exists on most modern systems. The/dev/stdout syntax does not refer to a new special file. It is just a magic cookie to specify standard output.

FUTURE DIRECTIONS

None.

SEE ALSO

umask() , uuencode

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 athttp://www.opengroup.org/unix/online.html .

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值