Subject: Re: bug#23110: seq apparent bug

From: Pádraig Brady <[email-masked]>
Date: Thu, 7 Apr 2016 19:18:16 +0100

On 07/04/16 15:40, Bernhard Voelker wrote:
> reopen 23110
> thanks
>
> On 04/07/2016 11:46 AM, Ruediger Meier wrote:
>> I understand that this issue is not a bug. But it wouldn't be also not a
>> bug if coreutils would behave like BSD:
>>
>> $ seq 1 0 10 ; echo $?
>> seq: zero increment
>> 1
>
> Ah, okay: as there's prior art in the BSDs [0], the attached
> proposes the same for GNU coreutils.
>
> [0] http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-7/src/usr.bin/seq/seq.c
>

I see FreeBSD has seq since 9.0.

I agree that we should avoid repeating output with "0" STEP.

Do we want to deal with these cases spinning the cpu?

   seq 1 nan 1
   seq 1 .0000000000000000000000000000001 1

As an aside, I see FreeBSD requires the STEP to be in the right direction
when FIRST != LAST, or it will also exit with error.
GNU will just output nothing in that case.

cheers,
Pádraig.