Greetings,

Here is an example that illustrates the problem:

Run the command:

    echo -n "BADCFEHG" | od -t x2z -A x --endian=little

The output is:

000000 4142 4344 4546 4748                      >BADCFEHG<
000008

As expected, the input data has been interpreted as 16-bit data and byte-swapped in the hex output, however the ASCII representation to the right is not byte-swapped.

I checked the documentation and its description of the 'z' type suffix offers no clue
as to whether the byte-swapping applies to the output characters or not.

FYI, I am using od version 9.4, running under Ubuntu 24.04.

Regards,

Ray Allen



Reply via email to