2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: seq
|
|
|
|
layout: command
|
2022-03-04 12:10:09 +00:00
|
|
|
version: 0.59.1
|
2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
|
2021-05-30 00:57:04 +00:00
|
|
|
Print sequences of numbers.
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
```> seq ...rest --separator --terminator --widths```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
- `...rest`: sequence values
|
|
|
|
- `--separator {string}`: separator character (defaults to \n)
|
|
|
|
- `--terminator {string}`: terminator character (defaults to \n)
|
|
|
|
- `--widths`: equalize widths of all numbers by padding with zeros
|
2021-05-30 00:57:04 +00:00
|
|
|
|
|
|
|
## Examples
|
2022-02-14 02:22:51 +00:00
|
|
|
|
|
|
|
sequence 1 to 10 with newline separator
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
|
|
|
> seq 1 10
|
2022-02-14 02:22:51 +00:00
|
|
|
```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
sequence 1.0 to 2.0 by 0.1s with newline separator
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
|
|
|
> seq 1.0 0.1 2.0
|
2022-02-14 02:22:51 +00:00
|
|
|
```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
sequence 1 to 10 with pipe separator
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
|
|
|
> seq -s '|' 1 10
|
2022-02-14 02:22:51 +00:00
|
|
|
```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
sequence 1 to 10 with pipe separator padded with 0
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
|
|
|
> seq -s '|' -w 1 10
|
2022-02-14 02:22:51 +00:00
|
|
|
```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
sequence 1 to 10 with pipe separator padded by 2s
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
|
|
|
> seq -s ' | ' -w 1 2 10
|
2022-02-14 02:22:51 +00:00
|
|
|
```
|