On Mon, Apr 10, 2023 at 5:35 AM Denys Vlasenko <[email protected]> wrote:
>
> On Tue, Apr 4, 2023 at 7:16 AM Keith Thompson
> <[email protected]> wrote:
> > The GNU coreutils seq command recognizes and handles negative
> > arguments.
> >
> > The busybox seq command does not. Any argument starting with a '-'
> > character is assumed to be an option name.
>
>
> Fixed, please try current git.

I just tried it (commit 200a9669f), and there's still a bug.

If you use "-s" with an argument *and* a negative number, it prints a
usage message.
As a workaround, you can use, for example, "-s:" as a single argument.

```
$ busybox seq -1 1
-1
0
1
$ busybox seq -w -1 1
-1
00
01
$ busybox seq -s: -1 1
-1:0:1
$ busybox seq -s : -1 1
seq: invalid option -- '1'
BusyBox v1.37.0.git (2023-04-10 09:16:21 PDT) multi-call binary.

Usage: seq [-w] [-s SEP] [FIRST [INC]] LAST

Print numbers from FIRST to LAST, in steps of INC.
FIRST, INC default to 1.

        -w      Pad with leading zeros
        -s SEP  String separator
$ busybox seq -s : 0 1
0:1
```
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to