GNU bug report logs - #23110
seq apparent bug

Previous Next

Package: coreutils;

Reported by: Маренков Евгений <hotpil <at> mail.ru>

Date: Thu, 24 Mar 2016 17:23:03 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 23110 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 23110 <at> debbugs.gnu.org
Subject: Re: bug#23110: seq apparent bug
Date: Fri, 8 Apr 2016 13:57:37 +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

<Resend since I don't see this on the lists after a day>

I see FreeBSD has seq since 9.0.

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

The patch is fine as is and good to push.

Do we want to deal with these cases spinning the cpu,
in further patches?

   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.




This bug report was last modified 6 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.