bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#208494: coreutils: seq -w doesn't work properly with two negativ


From: Jim Meyering
Subject: Re: Bug#208494: coreutils: seq -w doesn't work properly with two negative values
Date: Fri, 05 Sep 2003 11:37:09 +0200

Paul Eggert <address@hidden> wrote:
>> Patrick Mauritz <address@hidden> wrote:
>
>> > seq -w 0 -11 returns
>> > 000
>> > -01
>> > ...
>> > -11
>
> Thanks, but isn't there another bug here?  The default increment is 1,
> which means that seq 0 -11 should output nothing at all.
>
> The current seq code automatically defaults the increment to be -1 if
> the lower bound is less than the upper bound.  This sounds wrong to
> me.  If I issue the command 'seq 0', I expect to get zero lines of
> output, not two.  The increment should default to 1, as the
> documentation says.
>
> Here's a proposed patch.
>
> 2003-09-04  Paul Eggert  <address@hidden>
>
>       * src/seq.c (step): Default to 1.
>       (print_numbers): Allow the output to be empty.
>       (main): The default step is 1, even if LAST < FIRST;
>       as per documentation.
>       * tests/seq/basic (onearg-2): Output should be empty.

Thank you!
I've applied that.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]