///////
$ echo 'Andrii The Great' | hexdump -Cv
00000000 41 6e 64 72 69 69 20 54 68 65 20 47 72 65 61 74 |Andrii The Great|
00000010 0a |.|
00000011
$ echo -e '\x41\x6e\x64\x72\x69\x69\x20\x54\x68\x65\x20\x47\x72\x65\x61\x74'
Andrii The Great
: if you have huge amount of hex data to convert to binary---you can use xxd utility (part of vim package).
$ echo -e $( echo "30 31 323334 35 " | sed 's/ //g; s/../\\x&/g' )
////////
$ echo 'Andrii The Great' | hexdump -Cv
00000000 41 6e 64 72 69 69 20 54 68 65 20 47 72 65 61 74 |Andrii The Great|
00000010 0a |.|
00000011
$ echo -e '\x41\x6e\x64\x72\x69\x69\x20\x54\x68\x65\x20\x47\x72\x65\x61\x74'
Andrii The Great
: if you have huge amount of hex data to convert to binary---you can use xxd utility (part of vim package).
$ echo -e $( echo "30 31 323334 35 " | sed 's/ //g; s/../\\x&/g' )
////////
No comments:
Post a Comment