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.

There is a (rather inconvenient) workaround: you can add a leading
space, which is ignored.

Busybox 1.36.0 (built from source), Ubuntu 22.04.2, GNU coreutils 8.32.

```
$ seq -s : -5 5
-5:-4:-3:-2:-1:0:1:2:3:4:5
$ busybox seq -s : -5 5
seq: invalid option -- '5'
BusyBox v1.36.0 (2023-04-03 21:54:22 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 to last with leading zeros
        -s SEP  String separator
Exit 1
$ busybox seq -s : ' -5' 5
-5:-4:-3:-2:-1:0:1:2:3:4:5
```
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to