seq
for generators
Output sequences of numbers.
Signature
> seq {flags} ...rest
Parameters
...rest
: Sequence values.
Input/output types:
input | output |
---|---|
nothing | list<number> |
Examples
sequence 1 to 10
> seq 1 10
╭───┬────╮
│ 0 │ 1 │
│ 1 │ 2 │
│ 2 │ 3 │
│ 3 │ 4 │
│ 4 │ 5 │
│ 5 │ 6 │
│ 6 │ 7 │
│ 7 │ 8 │
│ 8 │ 9 │
│ 9 │ 10 │
╰───┴────╯
sequence 1.0 to 2.0 by 0.1s
> seq 1.0 0.1 2.0
╭────┬──────╮
│ 0 │ 1.00 │
│ 1 │ 1.10 │
│ 2 │ 1.20 │
│ 3 │ 1.30 │
│ 4 │ 1.40 │
│ 5 │ 1.50 │
│ 6 │ 1.60 │
│ 7 │ 1.70 │
│ 8 │ 1.80 │
│ 9 │ 1.90 │
│ 10 │ 2.00 │
╰────┴──────╯
sequence 1 to 5, then convert to a string with a pipe separator
> seq 1 5 | str join '|'
Subcommands:
name | description | type |
---|---|---|
seq char | Print a sequence of ASCII characters. | built-in |
seq date | Print sequences of dates. | built-in |