Changeset View
Standalone View
seq/seq.1
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
option. | option. | ||||
If any sequence numbers will be printed in exponential notation, | If any sequence numbers will be printed in exponential notation, | ||||
the default conversion is changed to | the default conversion is changed to | ||||
.Cm %e . | .Cm %e . | ||||
.El | .El | ||||
.Sh EXIT STATUS | .Sh EXIT STATUS | ||||
.Ex -std | .Ex -std | ||||
.Sh EXAMPLES | .Sh EXAMPLES | ||||
Generate sequence from 1 to 3 (including) with default increment of 1: | |||||
bcr: I'd add "(including)" after the 3 to indicate that the last number provided is also part of the… | |||||
0mpUnsubmitted Done Inline ActionsShouldn't it be inclusive instead of including? Also, a sequence and a default increment. The same for other examples as well I think. 0mp: Shouldn't it be inclusive //instead// of //including//?
Also, //a sequence// and //a default… | |||||
fernapeAuthorUnsubmitted Done Inline ActionsI used included as it is used in the Wikipedia article of ISO 31-11 fernape: I used //included// as it is used in the Wikipedia article of [[ https://en.wikipedia. | |||||
0mpUnsubmitted Done Inline ActionsNice! 0mp: Nice! | |||||
.Bd -literal -offset indent | .Bd -literal -offset indent | ||||
# seq 1 3 | # seq 1 3 | ||||
1 | 1 | ||||
2 | 2 | ||||
3 | 3 | ||||
.Ed | |||||
.Pp | |||||
Generate sequence from 3 to 1 (including) with default increment of -1: | |||||
Done Inline ActionsSame here for the 1: (including) bcr: Same here for the 1: (including) | |||||
.Bd -literal -offset indent | |||||
# seq 3 1 | # seq 3 1 | ||||
3 | 3 | ||||
2 | 2 | ||||
1 | 1 | ||||
.Ed | |||||
.Pp | |||||
Generate sequence from 0 to 0.1 (including) with increment of 0.05 and padding | |||||
Done Inline ActionsThe increment is 0.05 juan.molina_club.fr: The increment is 0.05 | |||||
Done Inline ActionsNice catch! fernape: Nice catch! | |||||
with leading zeroes. | |||||
Done Inline ActionsIf you want, you can make all these descriptions end in a colon (:) for consistency. bcr: If you want, you can make all these descriptions end in a colon (:) for consistency. | |||||
.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 sequence from 1 to 3 (including) with default increment of 1, custom separator string | |||||
0mpUnsubmitted Done Inline Actionsa custom separator and a custom terminator 0mp: //a custom separator// and //a custom terminator// | |||||
and custom terminator: | |||||
.Bd -literal -offset indent | |||||
# seq -s "-->" -t "[end of list]\\n" 1 3 | |||||
1-->2-->3-->[end of list] | |||||
.Ed | |||||
.Pp | |||||
Generate sequence from 1 to 2 (including) with increment of 0.2 and | |||||
.Xr printf 3 | |||||
style format to show two decimals: | |||||
0mpUnsubmitted Done Inline ActionsHow about
0mp: How about
> with an increment of 0.2 and print the results with two digits after the decimal… | |||||
fernapeAuthorUnsubmitted Done Inline ActionsI rephrased the text that is much clearer now. However for the the printf(3)-like, I observe the expression printf(3) style is used before in the man page. Shouldn't we keep it like that for consistency? Also, how can I use .Xr printf 3 and have the -like joined to the previous word? I could only find an example in dialog.3, but it was in the form \fBprintf(3)\fP-like format): which looses the cross-reference. fernape: I rephrased the text that is much clearer now.
However for the the //printf(3)-like//, I… | |||||
0mpUnsubmitted Not Done Inline ActionsWorks for me! Thanks a lot! 0mp: Works for me! Thanks a lot! | |||||
.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 , | ||||
.Xr printf 3 | .Xr printf 3 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
command first appeared in Version\~8 | command first appeared in Version\~8 | ||||
.At . | .At . | ||||
A | A | ||||
.Nm | .Nm | ||||
command appeared in | command appeared in | ||||
.Nx 3.0 , | .Nx 3.0 , | ||||
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 | ||||
The | The | ||||
.Fl w | .Fl w | ||||
option does not handle the transition from pure floating point | option does not handle the transition from pure floating point | ||||
to exponent representation very well. | to exponent representation very well. | ||||
The | The | ||||
.Nm | .Nm | ||||
command is not bug for bug compatible with other implementations. | command is not bug for bug compatible with other implementations. |
I'd add "(including)" after the 3 to indicate that the last number provided is also part of the resulting output. You might also want to end the sentence with a colon (:).