txwaiting4u
Programmer
I have a binary file that I am splitting based on a particular field in the file; it's a one character field. The field in ascii (text) would be a 1 or a 2. However, I can't check for a 1 or a 2 because it is in binary. How do I check for a 1 or 2 yet write out the output files in binary?
I tried dd to convert the file to ascii first but that didn't work. I would prefer to check the field by converting it to ascii in a variable which wouldn't modify the file at all. Anyone know of a possible solution? Thanks!
I tried dd to convert the file to ascii first but that didn't work. I would prefer to check the field by converting it to ascii in a variable which wouldn't modify the file at all. Anyone know of a possible solution? Thanks!