About 9,480 results
Open links in new tab
  1. Binary to hexadecimal and decimal in a shell script

    Feb 19, 2013 · I have a context where I need to convert binary to hexadecimal and decimal and viceversa in a shell script. Can someone suggest me a tool for this?

  2. Convert hexadecimal to binary on Linux CLI

    Apr 16, 2023 · The above command converts each sequence of 2 hexadecimal digits to the corresponding raw byte. To get a binary representation of those bytes, you can pipe to basenc - …

  3. convert a hex string to binary and send with netcat

    If you have xxd, that's easy: it can convert to and from hexadecimal. echo '0006303030304e43' | xxd -r -p | nc -l localhost 8181 I don't think there's a reasonable (and reasonably fast) way to convert …

  4. Converting from binary to hex and back - Unix & Linux Stack Exchange

    Mar 20, 2017 · Given a binary file, how do you convert it to a hex string and back, using only standard tools like sed and cut, on a minimal system with busybox installed? These tools are not available: …

  5. linux - Convert variable from little endian to big endian - Unix ...

    Nov 15, 2022 · To swap the endianness of a 16-bit value, you need to exchange the positions of the two bytes. That can be deconstructed into isolating the bytes from the word, moving them to another bit …

  6. Shell: How to read the bytes of a binary file and print as hexadecimal?

    In shell, how can I read the bytes of a binary file I have, and print the output as hexadecimal numbers?

  7. Convert a value into a "Binary Number" in a shell script

    Aug 15, 2015 · This question: Binary to hexadecimal and decimal in a shell script Asks how to convert FROM binary, not TO a binary number. The answers there deal either with binary byte (as opposed …

  8. Difficulty converting from binary to hexadecimal using bc

    Mar 25, 2015 · Difficulty converting from binary to hexadecimal using bc Ask Question Asked 10 years, 8 months ago Modified 7 years, 9 months ago

  9. BASH base conversion from decimal to hex - Unix & Linux Stack …

    Mar 19, 2015 · In Bash, how does one do base conversion from decimal to another base, especially hex. It seems easy to go the other way: $ echo $((16#55)) 85 With a web-search, I found a script that …

  10. How to dump a binary file as a C/C++ string literal?

    Dec 27, 2014 · I have a binary file I would like to include in my C source code (temporarily, for testing purposes) so I would like to obtain the file contents as a C string, something like this: …