Remplacer uuencode/uudecode par openssl

Date: 2014/05/20

Exemple

$ echo -n "Test" | openssl base64
VGVzdA==

$ echo "VGVzdA==" |openssl base64 -d
Test

En encore

cat /usr/share/doc/systemd/LICENSE.LGPL2.1 |head -12 |gzip |openssl base64

H4sIAAsBF1cAA2VRwW7CMAy95yvecZO6ijLtwBFQQUgdQnTsMu2Qti6NVhKUuCD+
fg6MHTYrOdh+7/nJBv7Gcr1DkZdlvsUyX+fbaYHNblas5pCfr8tc/aPc4p18MM5i
nGYJFlT5QfsLsslkohTm7njxZt8xHuaPsSiY2MLCE6F0LZ+1JyzcYBvNIpNgZetU
4SUTiLZfvbEoWcAs4qblDoveOZ9g5gJH+OsUGI2zbPSUPY8yYFdOFfIT+YuzBBNw
JH8wzNSAHWrxA20bNCawN9XABMFWMvsQm4aCgmvBnTB7U5MNhMbVw4GsOBA86k7b
vbF7GI7y1jF037szNalSH2+RKI87Qmt8YHjqSQcZf/pZ1FWeUFAI5LHcFCmwiiIh
+hssiwV9UwhDXQvM+TvpeiVT+bjizVCJQ0mvLpNf/XGCjmxN6sq4V+1wqGScXCn9
VOob+cnrRwACAAA=

( cat <<EOF H4sIAAsBF1cAA2VRwW7CMAy95yvecZO6ijLtwBFQQUgdQnTsMu2Qti6NVhKUuCD+ fg6MHTYrOdh+7/nJBv7Gcr1DkZdlvsUyX+fbaYHNblas5pCfr8tc/aPc4p18MM5i nGYJFlT5QfsLsslkohTm7njxZt8xHuaPsSiY2MLCE6F0LZ+1JyzcYBvNIpNgZetU 4SUTiLZfvbEoWcAs4qblDoveOZ9g5gJH+OsUGI2zbPSUPY8yYFdOFfIT+YuzBBNw JH8wzNSAHWrxA20bNCawN9XABMFWMvsQm4aCgmvBnTB7U5MNhMbVw4GsOBA86k7b vbF7GI7y1jF037szNalSH2+RKI87Qmt8YHjqSQcZf/pZ1FWeUFAI5LHcFCmwiiIh +hssiwV9UwhDXQvM+TvpeiVT+bjizVCJQ0mvLpNf/XGCjmxN6sq4V+1wqGScXCn9 VOob+cnrRwACAAA= EOF ) | openssl base64 -d | gzip -d > plop.txt

Base64 sans line return :
Utilisez '-A'Exemple

cat plop.sh |openssl base64 |tr -d '\n' |openssl base64 -A -d

Alternatives

Base45 :

https://www.bortzmeyer.org/9285.html