[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Enhancement request for od, dd
From: |
Jon Clifton |
Subject: |
RE: Enhancement request for od, dd |
Date: |
Fri, 7 Apr 2006 15:21:27 -0400 |
Bob,
I failed to make my point clear. I was trying to see the data as float or
double and they are just garbage without appropriate byteswapping.
I think the dd option "swab" is only for PDP-11 type data. It isn't the correct
format for Intel i386 and I can't remember if the bytes in a double end up
87654321 or 43218765 on Intel.
I guess an endian option for od would only be useful for -t formats larger than
1 byte such as -tfF or -tfD.
-----Original Message-----
From: Bob Proulx [mailto:address@hidden
Sent: Thursday, April 06, 2006 10:40 PM
To: Jon Clifton
Cc: address@hidden
Subject: Re: Enhancement request for od, dd
It would be most appreciated if you would group reply (or just to the
list since I am subscribed) to keep the others on the mailing list
involved. Also the mailing list mail is archived so that others can
benefit from the discussion later.
Jon Clifton wrote:
> My default alias for os is:
> alias od='od -t xz -Ax '
Ah, there is what I was fishing for. You are using -tx without a
size. It is defaulting to word size. Please try using it with -tx1
and look at the output. Is that acceptable? That should generate the
same output on either big or little endian machines.
od -tx1z -Ax
> After I learned enough about the data format I wrote a small C program on
> Linux that used ntohl() to byteswap the data where required and format it
> into ASCII.
Is that basically the same as the following?
dd conv=swab | od -txz
Sounds like you are on track.
Bob