D
D
Denis Kotlyarov2015-07-28 00:12:26
linux
Denis Kotlyarov, 2015-07-28 00:12:26

Linux, Bash, How to convert text to bytes?

How to convert text to bytes?
And then translate the bytes back into text?
I think it is necessary to translate into another number system from 10 to 2-rich chtoli?
But again the question is how?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2015-07-28
@denisandroid

$ echo 'test' | perl -lpe '$_=unpack"B*"'
01110100011001010111001101110100

$ echo 01110100011001010111001101110100 | perl -lpe '$_=pack"B*",$_'
test

E
Eddy_Em, 2015-07-28
@Eddy_Em

And what, the text is no longer bytes? Since when?
What do you need? base64 to do? Or change encoding?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question