Babak K. Shandiz
Babak K. Shandiz's Blog

Babak K. Shandiz's Blog

Living in the Shell #1; base64

Living in the Shell #1; base64

Babak K. Shandiz's photo
Babak K. Shandiz
·Nov 22, 2021·

1 min read

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
 
Share this