Living in the Shell #1; base64

Living in the Shell #1; base64

Encode inline

echo -n 'Hello World!' | base64

Encode file (into file)

base64 ~/.bashrc > encoded-file.txt
cat ~/.bashrc | base64 > encoded-file.txt

Decode inline

echo -n "SGVsbG8gV29ybGQh" | base64 -d

Decode file (into file)

base64 -d encoded-file.txt > decoded-file.txt
cat encoded-file.txt | base64 -d > decoded-file.txt