A
A
Aleksandr L.2019-12-02 01:54:04
bash
Aleksandr L., 2019-12-02 01:54:04

Base64 is encoded differently in bash and in online services, what's the point?

For example, if the text "1.txt" is encoded using base64.ru, then the result will be:
MS50eHQ=
5de4436d8e7a7238059326.png
If you use bash in debian or macos, then the output is slightly different:
$ echo 1.txt | base64
MS50eHQK
Why? How to fix output in bash?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2019-12-02
@AleksandrL

echo -n 1.txt | base64
-n means don't add a newline at the end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question