From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 10 09:56:58 2013 Received: (at submit) by debbugs.gnu.org; 10 Aug 2013 13:56:58 +0000 Received: from localhost ([127.0.0.1]:51831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V89f6-0001N3-IZ for submit@debbugs.gnu.org; Sat, 10 Aug 2013 09:56:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58168) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V89f0-0001Mu-N1 for submit@debbugs.gnu.org; Sat, 10 Aug 2013 09:56:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V89en-0006ff-Nn for submit@debbugs.gnu.org; Sat, 10 Aug 2013 09:56:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.0 required=5.0 tests=BAYES_40,T_DKIM_INVALID, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V89en-0006fZ-LA for submit@debbugs.gnu.org; Sat, 10 Aug 2013 09:56:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V89eh-0006RH-Hq for bug-coreutils@gnu.org; Sat, 10 Aug 2013 09:56:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V89eb-0006dl-Hp for bug-coreutils@gnu.org; Sat, 10 Aug 2013 09:56:31 -0400 Received: from mailbigip.dreamhost.com ([208.97.132.5]:46637 helo=homiemail-a60.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V89eb-0006dQ-88 for bug-coreutils@gnu.org; Sat, 10 Aug 2013 09:56:25 -0400 Received: from homiemail-a60.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a60.g.dreamhost.com (Postfix) with ESMTP id 4F9E13BC06A for ; Sat, 10 Aug 2013 06:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=7faNG69qU6B0l8mvGUY/0AZTvoA=; b=NIvcy7U5zUPrNxbs cUWXf1dg/NXFEEO2C2lzggYqqTDjXJZf3cWDnB4nSSMWL7GKB1JefXNE9O6XEIpt InTh+Q9b4lyZpIHhoPqTkL8epxbIqa7Cy2ZsH6DAyBrEl83eWIwnYHkakp2qoug2 l0q55pzaMIfBeGrvyPeHMp5lGpw= Received: from jidanni.org (122-118-147-144.dynamic.hinet.net [122.118.147.144]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a60.g.dreamhost.com (Postfix) with ESMTPSA id 114EF3BC063 for ; Sat, 10 Aug 2013 06:56:23 -0700 (PDT) From: jidanni@jidanni.org To: bug-coreutils@gnu.org Subject: `seq' prints the numbers from FIRST to (maybe almost) LAST by INCREMENT Date: Sat, 10 Aug 2013 21:56:19 +0800 Message-ID: <8761vdk5to.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) (info "(coreutils) seq invocation") ... seq [OPTION]... FIRST INCREMENT LAST `seq' prints the numbers from FIRST to LAST by INCREMENT. By default, each number is printed on a separate line. When INCREMENT is not specified, it defaults to `1', even when FIRST is larger than LAST. FIRST also defaults to `1'. So `seq 1' prints `1', but `seq 0' and `seq 10 5' produce no output. Floating-point numbers may be specified. *Note Floating point::. OK but I think you forgot to mention cases like $ seq 0 5 17 Will the last value printed be 15, 17, or 20? the user wonders. Hard to tell from the man/info page. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 10 11:20:54 2013 Received: (at 15068) by debbugs.gnu.org; 10 Aug 2013 15:20:54 +0000 Received: from localhost ([127.0.0.1]:51891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V8AyL-0003fR-H4 for submit@debbugs.gnu.org; Sat, 10 Aug 2013 11:20:53 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:56674) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V8AyJ-0003f9-4Q for 15068@debbugs.gnu.org; Sat, 10 Aug 2013 11:20:52 -0400 Received: from [192.168.1.11] (p57A5C6D9.dip0.t-ipconnect.de [87.165.198.217]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MP1NP-1VBBe72IOF-005qrl; Sat, 10 Aug 2013 17:20:44 +0200 Message-ID: <52065A4B.6010304@bernhard-voelker.de> Date: Sat, 10 Aug 2013 17:20:43 +0200 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: jidanni@jidanni.org Subject: Re: bug#15068: `seq' prints the numbers from FIRST to (maybe almost) LAST by INCREMENT References: <8761vdk5to.fsf@jidanni.org> In-Reply-To: <8761vdk5to.fsf@jidanni.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:2r3yydd1XuOjZJ7yILPJqP0jTsvOGRopeRHYnJZXkwj 7DIce6MpY3DWhu3W5FinzyOLWO7o6E1NqRxv4zv6ZBiNr5i3TR 0qrbag55Q+Sr3ji43a14KM220zzs514ugMY0+02ix0/AGvY3D1 Y/WLVNJao8Rl52xniq8kyDDfBOryem0cbgql0XN6/RIW2Szp6E M8xbyhE3nBR9gt40ePI4PYdvYjqp5DE56mthOmvNqWGAf2FT3F vmPpPDGBY5M42wToweIht7yEa6ldMaDSBc8A1U6+Zl3t/Hoerc wPnOopOcWRmzrQCAZVorHsE2erWq/mAjWqFUJUzaWxDlerbcD5 EhfuX9F/Q8e5/6JfJpyoyHJqumDdaKY85WDskQt/i X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 15068 Cc: 15068@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 08/10/2013 03:56 PM, jidanni@jidanni.org wrote: > (info "(coreutils) seq invocation") > > ... seq [OPTION]... FIRST INCREMENT LAST > > `seq' prints the numbers from FIRST to LAST by INCREMENT. By > default, each number is printed on a separate line. When INCREMENT is > not specified, it defaults to `1', even when FIRST is larger than LAST. > FIRST also defaults to `1'. So `seq 1' prints `1', but `seq 0' and > `seq 10 5' produce no output. Floating-point numbers may be specified. > *Note Floating point::. > > OK but I think you forgot to mention cases like > > $ seq 0 5 17 > > Will the last value printed be > 15, 17, or 20? > the user wonders. Hard to tell from the man/info page. Thanks for the report. The following should fix it. Have a nice day, Berny >From 4e9f5eb4e2f7614b74c1f930312acc455cc106e7 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Sat, 10 Aug 2013 17:19:06 +0200 Subject: [PATCH] doc: clarify when seq ends * doc/coreutils.texi (seq invocation): Add a sentence clarifying that seq terminates when LAST becomes smaller than the current number plus INCREMENT. * src/seq.c (usage): Likewise. Fixes http://bugs.gnu.org/15068 --- doc/coreutils.texi | 3 +++ src/seq.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index aef5cc9..21216b4 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -16810,6 +16810,9 @@ When @var{increment} is not specified, it defaults to @samp{1}, even when @var{first} is larger than @var{last}. @var{first} also defaults to @samp{1}. So @code{seq 1} prints @samp{1}, but @code{seq 0} and @code{seq 10 5} produce no output. +The sequence of numbers ends when the sum of the current number and +@var{increment} would become greater than @var{last}, +so @code{seq 1 10 10} only produces @samp{1}. Floating-point numbers may be specified. @xref{Floating point}. The program accepts the following options. Also see @ref{Common options}. diff --git a/src/seq.c b/src/seq.c index acbe235..35dfc8b 100644 --- a/src/seq.c +++ b/src/seq.c @@ -87,6 +87,8 @@ Print numbers from FIRST to LAST, in steps of INCREMENT.\n\ \n\ If FIRST or INCREMENT is omitted, it defaults to 1. That is, an\n\ omitted INCREMENT defaults to 1 even when LAST is smaller than FIRST.\n\ +The sequence of numbers ends when the sum of the current number and\n\ +INCREMENT would become greater than LAST.\n\ FIRST, INCREMENT, and LAST are interpreted as floating point values.\n\ INCREMENT is usually positive if FIRST is smaller than LAST, and\n\ INCREMENT is usually negative if FIRST is greater than LAST.\n\ -- 1.8.3.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 20:37:36 2013 Received: (at 15068-done) by debbugs.gnu.org; 18 Aug 2013 00:37:37 +0000 Received: from localhost ([127.0.0.1]:37510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAqzw-00048K-Co for submit@debbugs.gnu.org; Sat, 17 Aug 2013 20:37:36 -0400 Received: from mail1.vodafone.ie ([213.233.128.43]:49365) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAqzt-000487-WB for 15068-done@debbugs.gnu.org; Sat, 17 Aug 2013 20:37:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQBAPwWEFJtTn1b/2dsb2JhbAANToM7S78zgTeDGAEBAQQyAUYQCw0BAwMBAgEJJQ8CPggGDQEFAgEBiBOlEJFHjyOBPQeEEgOZEYUhhWKHBoE8gXA Received: from unknown (HELO [192.168.1.79]) ([109.78.125.91]) by mail1.vodafone.ie with ESMTP; 18 Aug 2013 01:37:16 +0100 Message-ID: <5210173B.40705@draigBrady.com> Date: Sun, 18 Aug 2013 01:37:15 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Bernhard Voelker Subject: Re: bug#15068: `seq' prints the numbers from FIRST to (maybe almost) LAST by INCREMENT References: <8761vdk5to.fsf@jidanni.org> <52065A4B.6010304@bernhard-voelker.de> In-Reply-To: <52065A4B.6010304@bernhard-voelker.de> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15068-done Cc: 15068-done@debbugs.gnu.org, jidanni@jidanni.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 08/10/2013 04:20 PM, Bernhard Voelker wrote: > On 08/10/2013 03:56 PM, jidanni@jidanni.org wrote: >> (info "(coreutils) seq invocation") >> >> ... seq [OPTION]... FIRST INCREMENT LAST >> >> `seq' prints the numbers from FIRST to LAST by INCREMENT. By >> default, each number is printed on a separate line. When INCREMENT is >> not specified, it defaults to `1', even when FIRST is larger than LAST. >> FIRST also defaults to `1'. So `seq 1' prints `1', but `seq 0' and >> `seq 10 5' produce no output. Floating-point numbers may be specified. >> *Note Floating point::. >> >> OK but I think you forgot to mention cases like >> >> $ seq 0 5 17 >> >> Will the last value printed be >> 15, 17, or 20? >> the user wonders. Hard to tell from the man/info page. > > Thanks for the report. > > The following should fix it. > > Have a nice day, > Berny > >>>From 4e9f5eb4e2f7614b74c1f930312acc455cc106e7 Mon Sep 17 00:00:00 2001 > From: Bernhard Voelker > Date: Sat, 10 Aug 2013 17:19:06 +0200 > Subject: [PATCH] doc: clarify when seq ends > > * doc/coreutils.texi (seq invocation): Add a sentence clarifying > that seq terminates when LAST becomes smaller than the current number > plus INCREMENT. > * src/seq.c (usage): Likewise. > Fixes http://bugs.gnu.org/15068 > --- > doc/coreutils.texi | 3 +++ > src/seq.c | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/doc/coreutils.texi b/doc/coreutils.texi > index aef5cc9..21216b4 100644 > --- a/doc/coreutils.texi > +++ b/doc/coreutils.texi > @@ -16810,6 +16810,9 @@ When @var{increment} is not specified, it defaults to @samp{1}, > even when @var{first} is larger than @var{last}. > @var{first} also defaults to @samp{1}. So @code{seq 1} prints > @samp{1}, but @code{seq 0} and @code{seq 10 5} produce no output. > +The sequence of numbers ends when the sum of the current number and > +@var{increment} would become greater than @var{last}, > +so @code{seq 1 10 10} only produces @samp{1}. > Floating-point numbers may be specified. @xref{Floating point}. > > The program accepts the following options. Also see @ref{Common options}. > diff --git a/src/seq.c b/src/seq.c > index acbe235..35dfc8b 100644 > --- a/src/seq.c > +++ b/src/seq.c > @@ -87,6 +87,8 @@ Print numbers from FIRST to LAST, in steps of INCREMENT.\n\ > \n\ > If FIRST or INCREMENT is omitted, it defaults to 1. That is, an\n\ > omitted INCREMENT defaults to 1 even when LAST is smaller than FIRST.\n\ > +The sequence of numbers ends when the sum of the current number and\n\ > +INCREMENT would become greater than LAST.\n\ > FIRST, INCREMENT, and LAST are interpreted as floating point values.\n\ > INCREMENT is usually positive if FIRST is smaller than LAST, and\n\ > INCREMENT is usually negative if FIRST is greater than LAST.\n\ > Looks good to me. thanks, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 18 17:54:58 2013 Received: (at 15068-done) by debbugs.gnu.org; 18 Aug 2013 21:54:58 +0000 Received: from localhost ([127.0.0.1]:38984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBAw6-00084f-1B for submit@debbugs.gnu.org; Sun, 18 Aug 2013 17:54:58 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:56040) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VBAw3-00084L-Fo for 15068-done@debbugs.gnu.org; Sun, 18 Aug 2013 17:54:56 -0400 Received: from [192.168.1.11] (p57A5C123.dip0.t-ipconnect.de [87.165.193.35]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0M51gc-1W1WCx3vTC-00ydMx; Sun, 18 Aug 2013 23:54:46 +0200 Message-ID: <521142A5.9020009@bernhard-voelker.de> Date: Sun, 18 Aug 2013 23:54:45 +0200 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: 15068-done@debbugs.gnu.org, P@draigBrady.com, jidanni@jidanni.org Subject: Re: bug#15068: `seq' prints the numbers from FIRST to (maybe almost) LAST by INCREMENT References: <8761vdk5to.fsf@jidanni.org> <52065A4B.6010304@bernhard-voelker.de> <5210173B.40705@draigBrady.com> In-Reply-To: <5210173B.40705@draigBrady.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:eOJIET3hD+mfzdYWjjooj86UBvrUqrMYUeO3zTyPfrW aXbDygOaQ7pgwQXrEKM+TWx94eBTw/IsLtL7V2RfBGaRTXzIjK zv12/dR0i7cv5KkE7KC/g3N+Zab3aN9Q/SwvkVgaLNLoRnq5RB jRr7fbR8H+tQRzFFXh9A6KeF7EMfR7g31WNZC+6hd7hpcOqXUX RrSMHLw08JcWywVx3LiyTkvfxPALr7UR6aN2ZMEPOu/FZ77/Ni zu9Qjs6Du9ZSKifIvDSK+wW1dydY82tF9DOAq6T0khpenTqmnz wUsI55Hh2fOvXy0H/fNbajGmWTdWNeJCDhdPb1WpJE8KKfJyM7 mISvAJclE6uelopzNCt1+efp6qhDejFG6DI6I/ECT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 15068-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 08/18/2013 02:37 AM, Pádraig Brady wrote: > Looks good to me. Thanks for the review. Pushed: http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=4e9f5eb4 I'm hereby marking this bug as 'done'. Have a nice day, Berny From unknown Sun Jun 22 03:53:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 16 Sep 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator