[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
od swap support?
From: |
Paul A. Clarke |
Subject: |
od swap support? |
Date: |
Fri, 10 Feb 2006 11:41:21 -0600 |
User-agent: |
Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929) |
Is there any interest in adding a flag to od to support byteswapping?
It would've been somewhat useful to me recently, so I thought I'd throw
the suggestion out...it also doesn't appear to be a significant effort,
which I'll volunteer for, if there is a chance of acceptance.
Example:
> cat /proc/cpuinfo | grep ^cpu
cpu : POWER5 (gr)
> od -tx1 endianb
0000000 61 62 63 64
0000004
address@hidden:/tmp> od -tx2 endianb
0000000 6162 6364
0000004
address@hidden:/tmp> od -tx4 endianb
0000000 61626364
0000004
# cat /proc/cpuinfo | grep ^vendor_id
vendor_id : GenuineIntel
# echo -n abcd > endiana
# od -c endiana
0000000 a b c d
0000004
# od -tx1 endiana
0000000 61 62 63 64
0000004
# od -tx2 endiana
0000000 6261 6463
0000004
# od -tx4 endiana
0000000 64636261
0000004
Suggestion:
# cat /proc/cpuinfo | grep ^vendor_id
vendor_id : GenuineIntel
# od -tx1 endiana
0000000 61 62 63 64
0000004
# od -tx2s endiana
0000000 6162 6364
0000004
# od -tx4s endiana
0000000 61626364
0000004
Regards,
Paul Clarke, IBM
(yes, my email changed since my last post here. :-)
- od swap support?,
Paul A. Clarke <=