Previous Section  < Day Day Up >  Next Section

uuencode, uudecode—encodes a binary file into ASCII text in order to send it through e-mail, or converts it back into its original form


uuencode [ source–file ] file–label

uudecode [ encoded–file ]


uuencode converts a binary file into an ASCII-encoded representation that can be sent using mail. The label argument specifies the output filename to use when decoding. If no file is given, stdin is encoded. uudecode reads an encoded file, strips off any leading and trailing lines added by mailer programs, and re-creates the original binary data with the filename and the mode and owner specified in the header. The encoded file is an ordinary ASCII text file; it can be edited by any text editor. But it is best only to change the mode or file label in the header to avoid corrupting the decoded binary.

Example A.68.

1   uuencode mybinfile decodedname > uumybinfile.tosend

2   uudecode uumybinfile.tosend


EXPLANATION

  1. The first argument, mybinfile, is the existing file to be encoded. The second argument is the name to be used for the uudecoded file, after mailing the file, and uumybinfile.tosend is the file that is sent through the mail.

  2. This decodes the uuencoded file and creates a filename as given as the second argument to uuencode.

    Previous Section  < Day Day Up >  Next Section