1 .\" $NetBSD: jot.1,v 1.9 2008/02/24 00:05:31 dsl 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
63 utility is used to print out increasing, decreasing, random,
64 or redundant data (usually numbers) one per line.
66 The following options are available:
67 .Bl -tag -width indent
73 This is an abbreviation for
76 Do not print the final newline normally appended to the output.
78 Print only as many digits or characters of the data
79 as indicated by the integer
83 the precision is the greater of the precisions of
89 option is overridden by whatever appears in a
94 Generate random data instead of sequential data, the default.
96 Print data separated by
98 Normally, newlines separate data.
102 with the generated data appended to it.
103 Octal, hexadecimal, exponential, ASCII, zero padded,
104 and right-adjusted representations
105 are possible by using the appropriate
107 conversion specification inside
109 in which case the data are inserted rather than appended.
112 The last four arguments indicate, respectively,
113 the number of data, the lower bound, the upper bound,
114 and the step size or, for random data, the seed.
115 While at least one of them must appear,
116 any of the other three may be omitted, and
117 will be considered as such if given as
119 Any three of these arguments determines the fourth.
120 If four are specified and the given and computed values of
122 conflict, the lower value is used.
123 If fewer than three are specified, defaults are assigned
124 left to right, except for
126 which assumes its default unless both
132 Defaults for the four arguments are, respectively,
133 100, 1, 100, and 1, except that when random data are requested,
135 defaults to a seed depending upon the time of day.
137 is expected to be an unsigned integer,
138 and if given as zero is taken to be infinite.
142 may be given as real numbers or as characters
143 representing the corresponding value in ASCII.
144 The last argument must be a real number.
146 Random numbers are obtained through
155 .Dl "jot 21 \-1 1.00"
156 prints 21 evenly spaced numbers increasing from \-1 to 1.
160 prints the ASCII character set.
163 .Dl "jot \-w xa%c 26 a"
170 .Dl "jot \-r \-c 160 a z | rs \-g 0 8"
171 prints 20 random 8-letter strings.
179 .Dl "jot \-w %ds/old/new/ 30 2 \- 5"
182 substitution commands applying to lines 2, 7, 12, etc.
185 .Dl "jot 0 9 \- \-.5"
186 prints the stuttering sequence 9, 8, 8, 7, etc.
189 .Dl "jot \-b x 512 \*[Gt] block"
190 creates a file containing exactly 1024 bytes.
193 .Dl "expand \-\`jot \-s, \- 10 132 4\`"
194 sets tabs four spaces apart starting
195 from column 10 and ending in column 132.
198 .Dl "grep \`jot \-s """" \-b . 80\`"
199 prints all lines 80 characters or longer.