This is a feature request of adding -d for xxd which will print binary digits in decimal numeric system, similarly to -b which prints dump in bits rather than hexdump.
Sample usage for hexdump and bit format:
kenorb@MBP$ python -c $'from struct import pack\nwith open("foo.bin", "wb") as file: file.write(pack("<IIIII", *bytearray([10, 20, 30, 40, 50])))'
kenorb@MBP$ xxd foo.bin
00000000: 0a00 0000 1400 0000 1e00 0000 2800 0000 ............(...
00000010: 3200 0000 2...
kenorb@MBP$ xxd -b foo.bin
00000000: 00001010 00000000 00000000 00000000 00010100 00000000 ......
00000006: 00000000 00000000 00011110 00000000 00000000 00000000 ......
0000000c: 00101000 00000000 00000000 00000000 00110010 00000000 (...2.
00000012: 00000000 00000000
Alternatively we could have universal parameter where you can specify any base system.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub![]()
This is implemented and merged: #5616
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #773 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The linked PR is about the offset column format, but the original question is about the output format of the data itself.
This is something I am also interested in.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()