Why does newline come before space in the output of hexdump?
- by ??????? ???????????
Printing these characters in the "Canonical" format gives the output that I expect, while the default format throws me off.
$ echo " " |hexdump # Reversed?
0000000 0a20
0000002
$ echo -n " " |hexdump # Ok, fair enough.
0000000 0020
$ echo " " |hexdump -C # Canonical
00000000 20 0a | .|
00000002
With a different string, such as "123" the output is even more confusing:
$ echo "123" |hexdump
0000000 3231 0a33
0000004
The output here does not seem "reversed", but rather shuffled. Would anyone care to explain (briefly) what is going on here?