W3cubDocs

/Nushell

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

>seq110
╭───┬────╮
01
12
23
34
45
56
67
78
89
910
╰───┴────╯

sequence 1.0 to 2.0 by 0.1s

>seq1.00.12.0
╭────┬──────╮
01.00
11.10
21.20
31.30
41.40
51.50
61.60
71.70
81.80
91.90
102.00
╰────┴──────╯

sequence 1 to 5, then convert to a string with a pipe separator

>seq15|str join'|'

Subcommands:

name type usage
seq char Builtin Print a sequence of ASCII characters.
seq date Builtin Print sequences of dates.

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/seq.html