coreutils
[Top][All Lists]
Advanced

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

Re: seq 0 0 0


From: Rasmus Borup Hansen
Subject: Re: seq 0 0 0
Date: Thu, 11 Dec 2014 15:59:12 +0100

I see that. The version I have does not say so, though. However, it does say:

`seq' prints the numbers from FIRST to LAST by INCREMENT.

This is why I expected a single line if FIRST and LAST are equal, no matter what INCREMENT is.

Now I also noticed that seq 0 -1 0 generates just a single line. In this case the sum of the current number and INCREMENT is less than LAST when the sequence ends.

Best,

Rasmus

Intomics is a contract research organization specialized in deriving core biological insight from large scale data. We help our clients in the pharmaceutical industry develop tomorrow's medicines better, faster, and cheaper through optimized use of biomedical data.
-----------------------------------------------------------------
Hansen, Rasmus Borup              Intomics - from data to biology
System Administrator              Diplomvej 377
Scientific Programmer             DK-2800 Kgs. Lyngby
                                  Denmark
E: address@hidden               W: http://www.intomics.com/
P: +45 5167 7972                  P: +45 8880 7979

On 11 Dec 2014, at 15:25, Pádraig Brady <address@hidden> wrote:

On 11/12/14 14:04, Rasmus Borup Hansen wrote:
I just noticed that the command "seq 0 0 0" produces infinitely many lines of zeros. Is this intentional? I was expecting only a single one. I'm using 8.21 on Ubuntu 14.04.

I'm not sure a single line would be appropriate.
It would either be all or none, right?

The info docs say: "The sequence of numbers ends when the sum of
the current number and INCREMENT would become greater than LAST"

So the output is consistent with that at least.

I notice that the FreeBSD version of seq exits with an error
for an increment of 0.

cheers,
Pádraig.



reply via email to

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