1 .\" $NetBSD: jot.1,v 1.12 2012/04/08 22:00:39 wiz Exp $
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)jot.1 8.1 (Berkeley) 6/6/93
37 .Nd print sequential or random data
55 utility is used to print out increasing, decreasing, random,
56 or redundant data (usually numbers) one per line.
58 The following options are available:
59 .Bl -tag -width indent
65 This is an abbreviation for
68 Do not print the final newline normally appended to the output.
70 Print only as many digits or characters of the data
71 as indicated by the integer
75 the precision is the greater of the precisions of
81 option is overridden by whatever appears in a
86 Generate random data instead of sequential data, the default.
88 Print data separated by
90 Normally, newlines separate data.
94 with the generated data appended to it.
95 Octal, hexadecimal, exponential, ASCII, zero padded,
96 and right-adjusted representations
97 are possible by using the appropriate
99 conversion specification inside
101 in which case the data are inserted rather than appended.
104 The last four arguments indicate, respectively,
105 the number of data, the lower bound, the upper bound,
106 and the step size or, for random data, the seed.
107 While at least one of them must appear,
108 any of the other three may be omitted, and
109 will be considered as such if given as
111 Any three of these arguments determines the fourth.
112 If four are specified and the given and computed values of
114 conflict, the lower value is used.
115 If fewer than three are specified, defaults are assigned
116 left to right, except for
118 which assumes its default unless both
124 Defaults for the four arguments are, respectively,
125 100, 1, 100, and 1, except that when random data are requested,
127 defaults to a seed depending upon the time of day.
129 is expected to be an unsigned integer,
130 and if given as zero is taken to be infinite.
134 may be given as real numbers or as characters
135 representing the corresponding value in ASCII.
136 The last argument must be a real number.
138 Random numbers are obtained through
148 prints the integers from 42 to 87, inclusive.
151 .Dl "jot 21 \-1 1.00"
152 prints 21 evenly spaced numbers increasing from \-1 to 1.
156 prints the ASCII character set.
159 .Dl "jot \-w xa%c 26 a"
166 .Dl "jot \-r \-c 160 a z | rs \-g 0 8"
167 prints 20 random 8-letter strings.
175 .Dl "jot \-w %ds/old/new/ 30 2 \- 5"
178 substitution commands applying to lines 2, 7, 12, etc.
181 .Dl "jot 0 9 \- \-.5"
182 prints the stuttering sequence 9, 8, 8, 7, etc.
185 .Dl "jot \-b x 512 \*[Gt] block"
186 creates a file containing exactly 1024 bytes.
189 .Dl "expand \-\`jot \-s, \- 10 132 4\`"
190 sets tabs four spaces apart starting
191 from column 10 and ending in column 132.
194 .Dl "grep \`jot \-s """" \-b . 80\`"
195 prints all lines 80 characters or longer.