xxd: incompatible -p option

Rafał Miłecki zajec5 at gmail.com
Sun Dec 12 17:40:32 UTC 2021


On 12.12.2021 18:07, Peter0x44 wrote:
> On Sun Dec 12, 2021 at 3:34 PM GMT, Denys Vlasenko wrote:
>> On Mon, Dec 6, 2021 at 12:56 PM Rafał Miłecki <zajec5 at gmail.com>
>> wrote:
>>> Hi,
>>>
>>> I deal with ~4 MiB of binary data stored as hex numbers in 1-line text
>>> file. I need to convert numbers to raw binary data. That can be done
>>> with -r -p options.
>>>
>>> With standalone xxd it works perfectly fine:
>>> $ cat data.bin | xxd -r -p | wc -c
>>> 3518210
>>>
>>> With busybox not so much:
>>> $ cat data.bin | busybox xxd -r -p | wc -c
>>> 30
>>
>> Can't reproduce with the current git. Can you?
> 
> I can reproduce using my distribution-provided busybox (v1.34.1), but not
> with the current git
> 
> $ cat data.bin | busybox xxd -r -p | wc -c
> 1930
> $ cat data.bin | ./busybox xxd -r -p | wc -c
> 15444
> 
> I bisected it down to commit 86ba007b84ae1ebe35e88c57e023caac3d2d9903 which fixed it for me.

Thanks a lot for finding that for me!


More information about the busybox mailing list