groff 1.23.0 added .MR to its -man macro package. The NEWS file states
that the inclusion of the macro "was prompted by its introduction to
Plan 9 from User Space's troff in August 2020." From d32deab it seems
that the name for Plan 9 from User Space's implementation was suggested
by groff maintainer G. Brandon Robinson.
Not sure if the intention was to make these definitions compatible, but
it would be nice if they were.
Currently, Plan 9 from User Space's .MR expects its second argument to
be parenthesized. groff's .MR does not. This results in extra
parentheses appearing in manual references when viewing Plan 9 from User
Space's manual pages on a system using groff.
76 lines
1.1 KiB
Groff
76 lines
1.1 KiB
Groff
.TH SEQ 1
|
|
.SH NAME
|
|
seq \- print sequences of numbers
|
|
.SH SYNOPSIS
|
|
.B seq
|
|
[
|
|
.B -w
|
|
]
|
|
[
|
|
.BI -f format
|
|
]
|
|
[
|
|
.I first
|
|
[
|
|
.I incr
|
|
]
|
|
]
|
|
.I last
|
|
.SH DESCRIPTION
|
|
.I Seq
|
|
prints a sequence of numbers, one per line, from
|
|
.I first
|
|
(default 1) to as near
|
|
.I last
|
|
as possible, in increments of
|
|
.I incr
|
|
(default 1).
|
|
The loop is:
|
|
.sp
|
|
.EX
|
|
for(val = min; val <= max; val += incr) print val;
|
|
.EE
|
|
.sp
|
|
The numbers are interpreted as floating point.
|
|
.PP
|
|
Normally integer values are printed as decimal integers.
|
|
The options are
|
|
.TP "\w'\fL-f \fIformat\fLXX'u"
|
|
.BI -f format
|
|
Use the
|
|
.MR print 3 -style
|
|
.I format
|
|
.IR print
|
|
for printing each (floating point) number.
|
|
The default is
|
|
.LR %g .
|
|
.TP
|
|
.B -w
|
|
Equalize the widths of all numbers by padding with
|
|
leading zeros as necessary.
|
|
Not effective with option
|
|
.BR -f ,
|
|
nor with numbers in exponential notation.
|
|
.SH EXAMPLES
|
|
.TP
|
|
.L
|
|
seq 0 .05 .1
|
|
Print
|
|
.BR "0 0.05 0.1"
|
|
(on separate lines).
|
|
.TP
|
|
.L
|
|
seq -w 0 .05 .1
|
|
Print
|
|
.BR "0.00 0.05 0.10" .
|
|
.SH SOURCE
|
|
.B \*9/src/cmd/seq.c
|
|
.SH BUGS
|
|
Option
|
|
.B -w
|
|
always surveys every value in advance.
|
|
Thus
|
|
.L
|
|
seq -w 1000000000
|
|
is a painful way to get an `infinite' sequence.
|