Write to output
cat var/tmp/myFile.txt | base64
Or write to file
cat var/tmp/myFile.txt | base64 > var/tmp/decodedFile.txt
Write to output
cat base64encoded.txt | base64 -d
Write to file
cat base64encoded.txt | base64 -d > var/tmp/decodedFile.txt
echo hello | base64
echo aGVsbG8K | base64 -d