GNU bug report logs - #14656
od -cx

Previous Next

Package: coreutils;

Reported by: "VANDEMAN, MIKE" <mv2371 <at> att.com>

Date: Tue, 18 Jun 2013 18:21:01 UTC

Severity: normal

Tags: moreinfo, notabug

Merged with 14657

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14656 in the body.
You can then email your comments to 14656 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#14656; Package coreutils. (Tue, 18 Jun 2013 18:21:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "VANDEMAN, MIKE" <mv2371 <at> att.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 18 Jun 2013 18:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "VANDEMAN, MIKE" <mv2371 <at> att.com>
To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org>
Subject: od -cx
Date: Tue, 18 Jun 2013 18:18:58 +0000
[Message part 1 (text/plain, inline)]
Why does od -cx display the characters backwards and with no alignment between the character & the hex value?

V=56
G=47
...

alpi104:

+ print 'VG Name               appl_vg'
0000000   V   G       N   a   m   e
        4756 4e20 6d61 2065 2020 2020 2020 2020
0000020                           a   p   p   l   _   v   g  \n
        2020 2020 2020 7061 6c70 765f 0a67

Mike Vandeman
510-204-0643
System Hosting - SSOP 2 Midrange Compression (Working 8:00 am - 4:30 pm PT Mon-Fri)



[Message part 2 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#14656; Package coreutils. (Tue, 18 Jun 2013 19:00:03 GMT) Full text and rfc822 format available.

Message #8 received at 14656 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: "VANDEMAN, MIKE" <mv2371 <at> att.com>
Cc: 14656 <at> debbugs.gnu.org
Subject: Re: bug#14656: od -cx
Date: Tue, 18 Jun 2013 12:59:36 -0600
tag 14656 + moreinfo
thanks

VANDEMAN, MIKE wrote:
> Why does od -cx display the characters backwards

Because as documented -x displays "2-byte units".  Also known as
"words".  And words are printed using the native machine endian
format.

You want -tx1.  This is an FAQ.  See the FAQ documentation for the
longer explanation.

  http://www.gnu.org/software/coreutils/faq/#The-_0027od-_002dx_0027-command-prints-bytes-in-the-wrong-order_002e

See the online standards documentation.

  http://pubs.opengroup.org/onlinepubs/009695399/utilities/od.html

> and with no alignment between the character & the hex value?

Huh?  What are you talking about?

> V=56
> G=47
> ...
> 
> alpi104:
> 
> + print 'VG Name               appl_vg'
> 0000000   V   G       N   a   m   e
>         4756 4e20 6d61 2065 2020 2020 2020 2020
> 0000020                           a   p   p   l   _   v   g  \n
>         2020 2020 2020 7061 6c70 765f 0a67

Please say more.  Please include enough information to recreate this
case as a small standalone test case.  Please use "echo" with no
options and no escape sequences, or "printf" which is standard, or
describe what "print" is doing to the data here.

  $ echo 'VG Name               appl_vg' | od -c
  0000000   V   G       N   a   m   e                                    
  0000020                           a   p   p   l   _   v   g  \n

  $ echo 'VG Name               appl_vg' | od -x
  0000000 4756 4e20 6d61 2065 2020 2020 2020 2020
  0000020 2020 2020 2020 7061 6c70 765f 0a67

  $ echo 'VG Name               appl_vg' | od -cx
  0000000   V   G       N   a   m   e                                    
             4756    4e20    6d61    2065    2020    2020    2020    2020
  0000020                           a   p   p   l   _   v   g  \n
             2020    2020    2020    7061    6c70    765f    0a67

Looks okay to me.

  $ echo 'VG Name               appl_vg' | od -Ax -tx1z -v
  000000 56 47 20 4e 61 6d 65 20 20 20 20 20 20 20 20 20  >VG Name         <
  000010 20 20 20 20 20 20 61 70 70 6c 5f 76 67 0a        >      appl_vg.<

Bob




Added tag(s) moreinfo. Request was from Bob Proulx <bob <at> proulx.com> to control <at> debbugs.gnu.org. (Tue, 18 Jun 2013 19:00:05 GMT) Full text and rfc822 format available.

Forcibly Merged 14656 14657. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Tue, 18 Jun 2013 22:05:02 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Tue, 18 Jun 2013 22:05:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 14656 <at> debbugs.gnu.org and "VANDEMAN, MIKE" <mv2371 <at> att.com> Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Tue, 18 Jun 2013 22:05:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 17 Jul 2013 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.