I am stumped by hexdump. In the following examples, I feed two bytes to
hexdump, 0x61 and 0x62. In the first line, it prints them in reverse
order. In the second, it seems correct. The only thing that changes is
the number of bytes handled at one time by the format:

:~: echo -n ab | hexdump -e "\"\" 2/2 \"%02x\" \"\n\""
6261  
:~: echo -n ab | hexdump -e "\"\" 2/1 \"%02x\" \"\n\""
6162

I expected them to yield the same result. Why does the first example
reverse the bytes? 

Judah

Reply via email to