I have a text file which each line is a one word coded base64 separely. Now I want to decode it. I'm trying to use base64 command line, but I'm getting all the words in only one line, I want one per line.
For example, my file is:
Y2F0Cg==
ZG9nCg==
aG91c2UK
I want as result:
dog
cat
house
But I'm getting:
dogcathouse
I think xargs could help, but I'm not getting the point.
You can use Python for that (no need for reading each line):
python -m base64 -d foo.txt
This works for me in base64
8.13:
base64 --decode test.txt
No need to split the file. Which version are you using?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With