version 1.2, 2022/02/27 07:13:31 |
version 1.3, 2022/02/27 15:02:08 |
|
|
.Sh EXAMPLES |
.Sh EXAMPLES |
Generate a sequence from 1 to 3 (inclusive) with a default increment of 1: |
Generate a sequence from 1 to 3 (inclusive) with a default increment of 1: |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
# seq 1 3 |
$ seq 1 3 |
1 |
1 |
2 |
2 |
3 |
3 |
|
|
.Pp |
.Pp |
Generate a sequence from 3 to 1 (inclusive) with a default increment of -1: |
Generate a sequence from 3 to 1 (inclusive) with a default increment of -1: |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
# seq 3 1 |
$ seq 3 1 |
3 |
3 |
2 |
2 |
1 |
1 |
|
|
Generate a sequence from 0 to 0.1 (inclusive) with an increment of 0.05 |
Generate a sequence from 0 to 0.1 (inclusive) with an increment of 0.05 |
and padding with leading zeroes: |
and padding with leading zeroes: |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
# seq -w 0 .05 .1 |
$ seq -w 0 .05 .1 |
0.00 |
0.00 |
0.05 |
0.05 |
0.10 |
0.10 |
|
|
Generate a sequence from 1 to 3 (inclusive) with a default increment of 1, |
Generate a sequence from 1 to 3 (inclusive) with a default increment of 1, |
and a custom separator string: |
and a custom separator string: |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
# seq -s " " 1 3 |
$ seq -s "," 1 3 |
1 2 3 |
1,2,3 |
.Ed |
.Ed |
.Pp |
.Pp |
Generate a sequence from 1 to 2 (inclusive) with an increment of 0.2 and |
Generate a sequence from 1 to 2 (inclusive) with an increment of 0.2 and |
|
|
.Xr printf 3 |
.Xr printf 3 |
style format): |
style format): |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
# seq -f %.2f 1 0.2 2 |
$ seq -f %.2f 1 0.2 2 |
1.00 |
1.00 |
1.20 |
1.20 |
1.40 |
1.40 |