bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: od swap support?


From: Paul A. Clarke
Subject: Re: od swap support?
Date: Mon, 13 Feb 2006 11:45:51 -0600
User-agent: Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929)

Paul Eggert wrote:
"Paul A. Clarke" <address@hidden> writes:
Is there any interest in adding a flag to od to support byteswapping?

Would "dd conv=swab | od" suffice?

No. "dd conv=swab" only swaps byte pairs, thus 32bit or 64bit structured data will not appear "correctly" unswapped:

(GenuineIntel)# dd conv=swab if=endiana | od -tx4
0+1 records in
0+1 records out
0000000 63646162
0000004

(Power5)> od -tx4 endiana
0000000 61626364
0000004

However, you have a point in that perhaps this enhancement should instead be targeted at the "dd" command instead of "od".

Thoughts?
Regards,
Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]