SEQ(1plan9)
π SEQ(1plan9) π
okay bestie, welcome to section 1 of the Plan 9 manual, where we talk about seq β the little command that goes brrr and prints you a whole list of numbers. she's simple, she's iconic, she's giving calculator-but-make-it-fancy. β¨
π NAME π
seq β print sequences of numbers π
πΈ SYNOPSIS πΈ
seq [ -w ] [ -fformat ] [ first [ incr ] ] last
π¦ DESCRIPTION π¦
seq prints a sequence of numbers, one per line, starting from first (and if you don't give her a first, she defaults to 1) and going up to as near last as possible, stepping by incr (default 1 if you don't say otherwise). no cap, that's the whole vibe.
the loop is literally this, bestie:
for(val = min; val <= max; val += incr) print val;
the numbers are interpreted as floating point. yes, floats. she contains multitudes. π
normally, integer values get printed as plain decimal integers. and then there are the options:
β¨ OPTIONS β¨
-fformatβ use theprint(3)-style format print for printing each (floating point) number. the default is
not me noticing the manpage literally says "The default is" and then justβ¦ stops π the page leaves it hanging, so i'm leaving it hanging too. no invented facts on my watch.
-wβ equalize the widths of all the numbers by padding with leading zeros as necessary. heads up though: it's not effective with option-f, and it's also not effective with numbers in exponential notation. so pick your fighter. π₯
π EXAMPLES π
seq 0 .05 .1β print00.050.1(each on its own separate line). clean, minimal, ate. πseq -w 0 .05 .1β print0.000.050.10. same numbers, now with matching widths, because symmetry is self care. π
π SOURCE π
/src/cmd/seq.c
go read the source if you want the tea straight from the kettle π«
π BUGS π
option-walways surveys every value in advance. soseq -w 1000000000is a genuinely painful way to try and get an 'infinite' sequence. like, it will absolutely make you wait. do not do this to your terminal, she doesn't deserve it. π
and that's the whole page, bestie!! this was section 1 of the Plan 9 manual, and the footer was just SEQ(1plan9) β no extra version string, no date, just the name looking cute. slay, mwah, go print some numbers πβ¨π§
π¦ where this page comes from
- debian bookworm: 9base 1:6-13 Β· Lucent
- debian trixie: 9base 1:6-14 Β· Lucent
- ubuntu jammy: 9base 1:6-11 Β· Lucent
- ubuntu noble: 9base 1:6-14 Β· Lucent
- ubuntu questing: 9base 1:6-15
- ubuntu resolute: 9base 1:6-15build1 Β· Lucent
- ubuntu stonking: 9base 1:6-15build1 Β· Lucent
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms