I am having weird output on base64 operations. I have something I want to programmatically download, and found that the links contains base64 encoded data ({date}.zip. This is evidenced by the following:
> echo "MjAyMS0wMS0xMy56aXA=" | base64 --decode
2021-01-13.zip%
If I pipe that back into base64, I get the same result back:
> echo "MjAyMS0wMS0xMy56aXA=" | base64 --decode | base64
MjAyMS0wMS0xMy56aXA=
However, if I pass the decoded string directly to base64, I get a different result:
> echo "2021-01-13.zip" | base64
MjAyMS0wMS0xMy56aXAK
Curious as to why this is happening, and how I can resolve.
Thanks!