From unknown Mon Jun 23 04:07:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14656 <14656@debbugs.gnu.org> To: bug#14656 <14656@debbugs.gnu.org> Subject: Status: od -cx Reply-To: bug#14656 <14656@debbugs.gnu.org> Date: Mon, 23 Jun 2025 11:07:31 +0000 retitle 14656 od -cx reassign 14656 coreutils submitter 14656 "VANDEMAN, MIKE" severity 14656 normal tag 14656 notabug moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 14:20:24 2013 Received: (at submit) by debbugs.gnu.org; 18 Jun 2013 18:20:24 +0000 Received: from localhost ([127.0.0.1]:53621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Up0Vy-0004Mq-Uu for submit@debbugs.gnu.org; Tue, 18 Jun 2013 14:20:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46773) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Up0V3-0004KS-BC for submit@debbugs.gnu.org; Tue, 18 Jun 2013 14:19:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Up0Ut-0002KU-Kk for submit@debbugs.gnu.org; Tue, 18 Jun 2013 14:19:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up0Ut-0002KL-Ha for submit@debbugs.gnu.org; Tue, 18 Jun 2013 14:19:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up0Uq-0005Ai-Bc for bug-coreutils@gnu.org; Tue, 18 Jun 2013 14:19:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Up0Ui-0002Hx-Vl for bug-coreutils@gnu.org; Tue, 18 Jun 2013 14:19:12 -0400 Received: from nbfkord-smmo07.seg.att.com ([209.65.160.93]:37442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up0Ui-0002HY-Qw for bug-coreutils@gnu.org; Tue, 18 Jun 2013 14:19:04 -0400 Received: from unknown [144.160.128.153] (EHLO flpi408.enaf.ffdc.sbc.com) by nbfkord-smmo07.seg.att.com(mxl_mta-6.15.0-1) over TLS secured channel with ESMTP id 794a0c15.0.316687.00-405.895741.nbfkord-smmo07.seg.att.com (envelope-from ); Tue, 18 Jun 2013 18:19:04 +0000 (UTC) X-MXL-Hash: 51c0a4987598d2a0-1e7cc7177cc9a2ddd883ed8e33bb4a0616ab2042 Received: from enaf.ffdc.sbc.com (localhost.localdomain [127.0.0.1]) by flpi408.enaf.ffdc.sbc.com (8.14.5/8.14.5) with ESMTP id r5IIJ2Qn017668 for ; Tue, 18 Jun 2013 11:19:02 -0700 Received: from flpi489.ffdc.sbc.com (flpi489.ffdc.sbc.com [130.4.162.183]) by flpi408.enaf.ffdc.sbc.com (8.14.5/8.14.5) with ESMTP id r5IIIwga017595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 18 Jun 2013 11:18:58 -0700 Received: from CAFRFD1MSGHUB9C.ITServices.sbc.com (cafrfd1msghub9c.itservices.sbc.com [135.161.21.163]) by flpi489.ffdc.sbc.com (RSA Interceptor) for ; Tue, 18 Jun 2013 18:18:53 GMT Received: from CAFRFD1MSGUSR9C.ITServices.sbc.com ([135.161.21.121]) by CAFRFD1MSGHUB9C.ITServices.sbc.com ([135.161.21.163]) with mapi id 14.02.0342.003; Tue, 18 Jun 2013 11:18:59 -0700 From: "VANDEMAN, MIKE" To: "bug-coreutils@gnu.org" Subject: od -cx Thread-Topic: od -cx Thread-Index: Ac5sS2/0vcS1sEAJTCOBSTMI136u5AABNFgA Date: Tue, 18 Jun 2013 18:18:58 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [135.70.104.204] Content-Type: multipart/alternative; boundary="_000_BDBDA0DE3722AE4296B05535A26698FB204EE421CAFRFD1MSGUSR9C_" MIME-Version: 1.0 X-RSA-Inspected: yes X-RSA-Classifications: public X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2010122901)] X-MAIL-FROM: X-SOURCE-IP: [144.160.128.153] X-AnalysisOut: [v=2.0 cv=Ee9/toaC c=1 sm=0 a=xwOvzTHDVLE4u4nGvK72ag==:17 a] X-AnalysisOut: [=i-yK8QnmiJwA:10 a=ofMgfj31e3cA:10 a=BLceEmwcHowA:10 a=zQP] X-AnalysisOut: [7CpKOAAAA:8 a=XIqpo32RAAAA:8 a=J6Il1bID4cG9BuHP3vsA:9 a=Cj] X-AnalysisOut: [uIK1q_8ugA:10 a=vYoypPKCfSgA:10 a=Hulf2KXwOXxQNu7xCf0A:9 a] X-AnalysisOut: [=_W_S_7VecoQA:10 a=frz4AuCg-hUA:10 a=8StiqUAmw4lC1OOY:21] X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 18 Jun 2013 14:20:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --_000_BDBDA0DE3722AE4296B05535A26698FB204EE421CAFRFD1MSGUSR9C_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Why does od -cx display the characters backwards and with no alignment betw= een the character & the hex value? V=3D56 G=3D47 ... 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) --_000_BDBDA0DE3722AE4296B05535A26698FB204EE421CAFRFD1MSGUSR9C_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Why does od –cx display the characters backwards and with no ali= gnment between the character & the hex value?
 
V=3D56
G=3D47
 
alpi104:
 
+ print 'VG Name        &n= bsp;      appl_vg'
0000000   V   G      = ; N   a   m   e     =             &nb= sp;            =      
        4756 4e= 20 6d61 2065 2020 2020 2020 2020
0000020          &nb= sp;            =     a   p   p   l   = _   v   g  \n
        2020 2020 2020 7061 6c70 76= 5f 0a67
 
Mike Vandeman
510-204-0643
System Hosting - SSOP 2 Midrange Compression= (Working 8:00 am - 4:30 pm PT Mon-Fri)
 
 
 
--_000_BDBDA0DE3722AE4296B05535A26698FB204EE421CAFRFD1MSGUSR9C_-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 14:59:40 2013 Received: (at 14656) by debbugs.gnu.org; 18 Jun 2013 18:59:40 +0000 Received: from localhost ([127.0.0.1]:53697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Up180-0005hA-7k for submit@debbugs.gnu.org; Tue, 18 Jun 2013 14:59:40 -0400 Received: from joseki.proulx.com ([216.17.153.58]:56233) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Up17x-0005gx-UZ; Tue, 18 Jun 2013 14:59:38 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id A3AB3211DA; Tue, 18 Jun 2013 12:59:36 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 5B6FF2DC5C; Tue, 18 Jun 2013 12:59:36 -0600 (MDT) Date: Tue, 18 Jun 2013 12:59:36 -0600 From: Bob Proulx To: "VANDEMAN, MIKE" Subject: Re: bug#14656: od -cx Message-ID: <20130618185936.GA28141@hysteria.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 14656 Cc: 14656@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.2 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 18 18:04:36 2013 Received: (at control) by debbugs.gnu.org; 18 Jun 2013 22:04:36 +0000 Received: from localhost ([127.0.0.1]:53989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Up40x-00052G-73 for submit@debbugs.gnu.org; Tue, 18 Jun 2013 18:04:35 -0400 Received: from mail2.vodafone.ie ([213.233.128.44]:11613) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Up40t-00051v-JZ; Tue, 18 Jun 2013 18:04:32 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjkDAPPYwFFda1ms/2dsb2JhbAANTQ6DLINKvAsDAYEagxcBAQEDASMPAUYFCwsNCwICBRYLAgIJAwIBAgFFBg0BBwEBiAQSqE5zkUKBJo02XweCTYEUA54EjVE/ Received: from unknown (HELO [192.168.1.79]) ([93.107.89.172]) by mail2.vodafone.ie with ESMTP; 18 Jun 2013 23:04:24 +0100 Message-ID: <51C0D968.5030502@draigBrady.com> Date: Tue, 18 Jun 2013 23:04:24 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#14657: od -cx References: <51C0C05D.5010300@cs.ucla.edu> <51C0C604.8050708@cs.ucla.edu> In-Reply-To: <51C0C604.8050708@cs.ucla.edu> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 14657@debbugs.gnu.org, "VANDEMAN, MIKE" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) forcemerge 14657 14656 tag 14656 notabug close 14656 stop On 06/18/2013 09:41 PM, Paul Eggert wrote: > On 06/18/13 13:24, VANDEMAN, MIKE wrote: >> It's either aligned, or it isn't. It's not: > > But it is aligned, for me. Most likely you have an old > implementation of od, or an implementation that's not coreutils. > > Here's what I get: > > $ echo ' appl' | od -ctx1 > 0000000 a p p l \n > 20 20 20 20 20 20 61 70 70 6c 0a As a side note I notice that solaris and bsd align to the start of the digits, rather than to the end. Anyway.... > 0000013 > $ od --version > od (GNU coreutils) 8.21 > Copyright (C) 2013 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later . > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > Written by Jim Meyering. I was able to reproduce this on 5.97: $ head -n1 /etc/issue Red Hat Enterprise Linux Server release 5.9 (Tikanga) $ /usr/bin/od --version | head -n1 od (GNU coreutils) 5.97 $ echo ' appl' | /usr/bin/od -ctx1 0000000 a p p l \n 20 20 20 20 20 20 61 70 70 6c 0a 0000013 Anyway this is already fixed, I suspect by something like: http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=20c0b870 thanks, Pádraig. From unknown Mon Jun 23 04:07:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 17 Jul 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator