Byte-order in od -x (Win2K)

Dave Korn
Tue Jun 28 15:56:00 GMT 2005

----Original Message----
>From: Fergus Daly
>Sent: 28 June 2005 15:45

> ("od -x .." outputs the strange transposition of bytes that you have
> referred to.)

  It's not a 'transposition of bytes'.  It's not bytes at all; "od -x"
defaults to reading 16-bit short integers, and outputs them in host-endian
order.  It's completely correct.  "od -x" is the same as "od -x2" which is
different from "od -x1" which is what the OP really wanted in the first

  Now, I'd certainly agree that short int is a strange default for od (as
indeed is octal, which it defaults to if you don't specify a base
explicitly); but it's not 'strange' and nothing is 'transposed', it's simply
correct-albeit-unexpected behaviour.

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list