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
[EMAIL PROTECTED]:/tmp> od -tx2 endianb
0000000 6162 6364
0000004
[EMAIL PROTECTED]:/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.  :-)


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

Reply via email to