seq(1): complete EXAMPLES section
* Add a small description before the EXAMPLES that are already in the man page to explicitely state what we are trying to show instead of having the user guess what the example is doing. * Add two more examples to show usage of -s, -t and -f * mandoc -Tlint reports irrelevant use of .Tn so remove them since according to mdoc(7) it is there only for compatibility and should not be used in new manuals. Approved by: 0mp@
This commit is contained in:
parent
1831993577
commit
f3ec6af0e4
@ -29,7 +29,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd April 30, 2018
|
.Dd June 20, 2020
|
||||||
.Dt SEQ 1
|
.Dt SEQ 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -133,22 +133,51 @@ the default conversion is changed to
|
|||||||
.Sh EXIT STATUS
|
.Sh EXIT STATUS
|
||||||
.Ex -std
|
.Ex -std
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
|
Generate a sequence from 1 to 3 (included) 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
|
||||||
|
.Ed
|
||||||
|
.Pp
|
||||||
|
Generate a sequence from 3 to 1 (included) with a default increment of -1:
|
||||||
|
.Bd -literal -offset indent
|
||||||
# seq 3 1
|
# seq 3 1
|
||||||
3
|
3
|
||||||
2
|
2
|
||||||
1
|
1
|
||||||
|
.Ed
|
||||||
|
.Pp
|
||||||
|
Generate a sequence from 0 to 0.1 (included) with an increment of 0.05 and padding
|
||||||
|
with leading zeroes.
|
||||||
|
.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
|
||||||
.Ed
|
.Ed
|
||||||
|
.Pp
|
||||||
|
Generate a sequence from 1 to 3 (included) with a default increment of 1,
|
||||||
|
a custom separator string and a custom terminator:
|
||||||
|
.Bd -literal -offset indent
|
||||||
|
# seq -s "-->" -t "[end of list]\\n" 1 3
|
||||||
|
1-->2-->3-->[end of list]
|
||||||
|
.Ed
|
||||||
|
.Pp
|
||||||
|
Generate a sequence from 1 to 2 (included) with an increment of 0.2 and
|
||||||
|
print the results with two digits after the decimal point (using a
|
||||||
|
.Xr printf 3
|
||||||
|
style format):
|
||||||
|
.Bd -literal -offset indent
|
||||||
|
# seq -f %.2f 1 0.2 2
|
||||||
|
1.00
|
||||||
|
1.20
|
||||||
|
1.40
|
||||||
|
1.60
|
||||||
|
1.80
|
||||||
|
2.00
|
||||||
|
.Ed
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr jot 1 ,
|
.Xr jot 1 ,
|
||||||
.Xr printf 1 ,
|
.Xr printf 1 ,
|
||||||
@ -165,12 +194,8 @@ command appeared in
|
|||||||
and was ported to
|
and was ported to
|
||||||
.Fx 9.0 .
|
.Fx 9.0 .
|
||||||
This command was based on the command of the same name in
|
This command was based on the command of the same name in
|
||||||
.Tn "Plan 9 from Bell Labs"
|
Plan 9 from Bell Labs and the GNU core utilities.
|
||||||
and the
|
The GNU
|
||||||
.Tn GNU
|
|
||||||
core utilities.
|
|
||||||
The
|
|
||||||
.Tn GNU
|
|
||||||
.Nm
|
.Nm
|
||||||
command first appeared in the 1.13 shell utilities release.
|
command first appeared in the 1.13 shell utilities release.
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
|
Loading…
Reference in New Issue
Block a user