Uuencode/uudecode: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Linux =Overview= Utilities are used to transmit binary files over transmission mediums that do not support other than simple ASCII data. The...")
 
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:


=To Encode=
=To Encode=
uuencode -m -o transit.txt ./payload.json payload.json
Result:
<pre>
begin-base64 644 payload.json
ewogICJzcGVjIjoKICB7CiAgICAicmVwbGljYXMiOiIyIiwKICAgICJ0ZW1wbGF0ZSI6CiAgICB7
...
IH0KICAgICAgICBdCiAgICAgIH0KICAgIH0KICB9Cn0KCg==
====
</pre>


=To Decode=
=To Decode=


The uudecode utility ignores any leading (preceding "begin-base64") and trailing (following "====") lines.
The uudecode utility ignores any leading (preceding "begin-base64") and trailing (following "====") lines.
uudecode ./transit.txt

Latest revision as of 19:43, 25 February 2018

Internal

Overview

Utilities are used to transmit binary files over transmission mediums that do not support other than simple ASCII data. They support the "traditional" uuencoding algorithm and the base64 method.

To Encode

uuencode -m -o transit.txt ./payload.json payload.json

Result:

begin-base64 644 payload.json
ewogICJzcGVjIjoKICB7CiAgICAicmVwbGljYXMiOiIyIiwKICAgICJ0ZW1wbGF0ZSI6CiAgICB7
...
IH0KICAgICAgICBdCiAgICAgIH0KICAgIH0KICB9Cn0KCg==
====

To Decode

The uudecode utility ignores any leading (preceding "begin-base64") and trailing (following "====") lines.

uudecode ./transit.txt