-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to trever plantaginate on 7/17/2009 4:22 PM:
> OD is listing the bytes of a file in reverse order due to how it would look 
> in memory and not how the bytes appear in the file.

Not true, nor is this a bug in od.  There is a difference between
little-endian and big-endian machines, and od is one of the tool that
exposes those differences (you will get your desired ordering if you were
to repeat your same test on a different architecture).  You are seeing the
listing exactly as it would appear reading 16 bits at a time given your
machine's endianness.

If you truly want byte listings, rather than uint16_t listings, then use
od -tx1.

>  Pipes to and from this command would alter the original oder of the
file's contents.

Pipes effectively pass 8 bits at a time, not 16 bits at a time.  So, on
your machine (regardless of whether it is little- or big-endian), data
will not be scrambled.  You only get scrambling when you interpret
multiple bytes as a single entity in a different manner than which your
hardware does.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             e...@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkphIPUACgkQ84KuGfSFAYA9cACfUzckHFadyh7UGKWVFDcAN7wu
fi0AnRQm/NYCkd+JVMiOJyxKX3wgUQTW
=Pi5T
-----END PGP SIGNATURE-----


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to