seq.1 (1130B)
1 .TH SEQ 1 2 .SH NAME 3 seq \- print sequences of numbers 4 .SH SYNOPSIS 5 .B seq 6 [ 7 .B -w 8 ] 9 [ 10 .BI -f format 11 ] 12 [ 13 .I first 14 [ 15 .I incr 16 ] 17 ] 18 .I last 19 .SH DESCRIPTION 20 .I Seq 21 prints a sequence of numbers, one per line, from 22 .I first 23 (default 1) to as near 24 .I last 25 as possible, in increments of 26 .I incr 27 (default 1). 28 The loop is: 29 .sp 30 .EX 31 for(val = min; val <= max; val += incr) print val; 32 .EE 33 .sp 34 The numbers are interpreted as floating point. 35 .PP 36 Normally integer values are printed as decimal integers. 37 The options are 38 .TP "\w'\fL-f \fIformat\fLXX'u" 39 .BI -f format 40 Use the 41 .IR print (3)-style 42 .I format 43 .IR print 44 for printing each (floating point) number. 45 The default is 46 .LR %g . 47 .TP 48 .B -w 49 Equalize the widths of all numbers by padding with 50 leading zeros as necessary. 51 Not effective with option 52 .BR -f , 53 nor with numbers in exponential notation. 54 .SH EXAMPLES 55 .TP 56 .L 57 seq 0 .05 .1 58 Print 59 .BR "0 0.05 0.1" 60 (on separate lines). 61 .TP 62 .L 63 seq -w 0 .05 .1 64 Print 65 .BR "0.00 0.05 0.10" . 66 .SH SOURCE 67 .B \*9/src/cmd/seq.c 68 .SH BUGS 69 Option 70 .B -w 71 always surveys every value in advance. 72 Thus 73 .L 74 seq -w 1000000000 75 is a painful way to get an `infinite' sequence.