Topic:
-----

The INCREMENT in seq when FIRST equals LAST.


Platform and version:
---------------------

SuSE 7.1
$ rpm -qf /usr/bin/seq
sh-utils-2.0-6


Problem:
--------

The documentation says that the increment should be negative.  The
implementation requires it to be positive, while the error message says
nothing in this case.  Theoretically any number should be allowed.  Note
that mathematically "smaller" does not include "equal".


Example:
--------

$ seq 3 -2 3
seq: when the starting value is smaller than the limit,
the increment must be positive
Try `seq --help' for more information.
$ seq --help
Usage: seq [OPTION]... LAST
  or:  seq [OPTION]... FIRST LAST
  or:  seq [OPTION]... FIRST INCREMENT LAST
Print numbers from FIRST to LAST, in steps of INCREMENT.
[...]
INCREMENT should be positive if FIRST is smaller than LAST, and negative
otherwise.  [...]


Suggested solution:
------------------

Change the documentation to (and change implementation to comply to):

INCREMENT should be positive if FIRST is smaller than LAST.  It should be
negative if FIRST is larger than LAST.  Otherwise it can be any number.


Regards,

Huaiyu



_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils

Reply via email to