On Wed, Mar 19, 2008 at 7:18 AM, J. Milgram <[EMAIL PROTECTED]> wrote: > :~: 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?
Because of the byte ordering on your system. Your system is little-endian, which means it stores the least-significant bytes first in memory. See http://en.wikipedia.org/wiki/Little_endian Dustin -- Storage Software Engineer http://www.zmanda.com
