1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-04 23:58:01 +00:00

Add Create A Sequence Of Values With A Step as a unix til

This commit is contained in:
jbranchaud
2021-06-14 11:59:34 -05:00
parent 2cb95c1ffb
commit 6282b4b24d
2 changed files with 39 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
# Create A Sequence Of Values With A Step
The `seq` utility allows you to output a sequence of values.
You can start at `1` by default.
```bash
$ seq 3
1
2
3
```
Or you can specify the starting value.
```bash
$ seq 10 13
10
11
12
13
```
Adding a third argument in between those two will specify the step value that
should be taken to get from one to the other.
```bash
$ seq 6 3 15
6
9
12
15
```
That sequence starts at 6 and goes to 15 with a step value of 3.
See `man seq` for more details.