Convert binary file in to ascii file using shell script
Hi,
i am trying to convert a binary file in to ASCII using shell script. this file contains multiple types of data like string, number, bcd, etc. can any one guide me how to do that? |
I think either you or I don't understand the issue here... ASCII in many ways is binary - it's a way of assigning letters to binary numbers (or in fact numbers in general). So you can probably view the data in the file by using a hexeditor, but to "convert" it to ASCII doesn't make much sense to me.
However, perhaps you could provide us with an example of some binary and the ASCII you would like to convert it into, so we can see more precisely what you want :) |
there is a strings command that looks at binary files and prints out lists of 3 or more consecutive ascii chars.
|
google results for bash parse binary file
first hit might get you on the way http://stackoverflow.com/questions/1...ad-binary-file |
not sure if this is what you want but this code reads a file char-by-char and if it is not a printable ascii letter, it will substitute it as a space:
Code:
#include "stdio.h" |
Quote:
|
All times are GMT -5. The time now is 12:53 AM. |