Subject: Re: bug#14657: od -cx

From: Pádraig Brady <[email-masked]>
Date: Tue, 18 Jun 2013 23:04:24 +0100

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 <http://gnu.org/licenses/gpl.html>.
> 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.