This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Byte-order in od -x (Win2K)
- From: Eric Blake <ebb9 at byu dot net>
- To: Andreas Eibach <ae_cygwin1 at web dot de>
- Cc: cygwin at cygwin dot com
- Date: Tue, 28 Jun 2005 07:48:35 -0600
- Subject: Re: Byte-order in od -x (Win2K)
- References: <1478835646@web.de>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Andreas Eibach on 6/28/2005 7:36 AM:
> Well, looks like a feature or a bug. :))
Feature.
>
> $ ls -hog CD0.dat
>
> -rw-r--r-- 1 0 Jun 28 14:46 CD0.dat
> (minus r; w minus; r minus; minus r; minus minus)
>
>
> and now ...
>
> $ ls -hog CD0.dat | od -x
>
> 722d 2d77 2d72 722d ....
>
> Definitely wrong byte order.
Well, what do you expect on a little-endian machine, when you are passing
characters to od in big-endian order?
> Can that be tweaked somehow?
Yes - try "od --help" to see other display formats. For example, "od -t
x1" prints hex bytes one at a time, with no endianness issues. Or try "ls
- -hog | dd conv=swab status=noxfer | od -x", with that dd in the middle
doing a byte-swap.
- --
Life is short - so eat dessert first!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCwVUz84KuGfSFAYARAj2CAKChJGQyLRGyaxIiwyGTIqcA/cthpgCg0/4S
w5fxo4Tn1ez3ipIVoRbATfE=
=jW4d
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/