0

am working with a very minimal version of linux borph, I use this OS to interact with a FPGA. I could read some registers inside the FPGA using a process who ask for the data via telnet and gives me the data in hexadecimal inside one string, ergo I have something like '0x12A24'.

Like the process is triggered by an ash command I made a little script to save the data in other file using the usual echo $(data) >> data_file

But I strongly suspect that echo prints the info in ASCII making my data_file much bigger and I don't count with a lot of space. There is a way to write directly in binary using an ash script?? Or a way to convert hexadecimal value written in ASCII to the same value in binary??

0 Answers0