[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13394: Misalignment for "seq -w"
From: |
Bernhard Voelker |
Subject: |
bug#13394: Misalignment for "seq -w" |
Date: |
Wed, 09 Jan 2013 11:34:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 01/09/2013 11:14 AM, Marcel Böhme wrote:
> Dear all,
>
> There are the following problems with the -w parameter of the seq tool:
>
> $seq -w -1 1.0 0
> -1.0
> 0.0
> 1.0
>
> But it should print:
> -1.0
> 00.0
> 01.0
Hmm, according to the TEXI manual, the FIRST number should also use
a fixed point decimal representation when the -w option is used:
`-w'
`--equal-width'
Print all numbers with the same width, by padding with leading
zeros. FIRST, STEP, and LAST should all use a fixed point decimal
representation. (To have other kinds of padding, use `--format').
Thus, seq is just doing what the manual says:
$ seq -w -1.0 1.0 0.0
-1.0
00.0
But that leaves the question open if there's a reason for this.
I.e. if it's just documented behavior, a requirement of some
standard or due to compatibility reasons.
But as Padraig worked in this area recently ([1]), I think there
is further room for improvement ... and then the documentation
should be fixed.
@Padraig: WDYT?
Have a nice day,
Berny
[1] http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=64d4a280