1 .\" $NetBSD: jot.1,v 1.3 1997/11/01 04:58:39 mycroft 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. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by the University of
17 .\" California, Berkeley and its contributors.
18 .\" 4. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" @(#)jot.1 8.1 (Berkeley) 6/6/93
41 .Nd print sequential or random data
59 utility is used to print out increasing, decreasing, random,
60 or redundant data (usually numbers) one per line.
62 The following options are available:
63 .Bl -tag -width indent
65 Generate random data instead of sequential data, the default.
73 with the generated data appended to it.
74 Octal, hexadecimal, exponential, ASCII, zero padded,
75 and right-adjusted representations
76 are possible by using the appropriate
78 conversion specification inside
80 in which case the data are inserted rather than appended.
82 This is an abbreviation for \fB\-w %c\fP.
84 Print data separated by
86 Normally, newlines separate data.
88 Do not print the final newline normally appended to the output.
90 Print only as many digits or characters of the data
91 as indicated by the integer
95 the precision is the greater of the precisions of
101 option is overridden by whatever appears in a
107 The last four arguments indicate, respectively,
108 the number of data, the lower bound, the upper bound,
109 and the step size or, for random data, the seed.
110 While at least one of them must appear,
111 any of the other three may be omitted, and
112 will be considered as such if given as
114 Any three of these arguments determines the fourth.
115 If four are specified and the given and computed values of
117 conflict, the lower value is used.
118 If fewer than three are specified, defaults are assigned
119 left to right, except for
121 which assumes its default unless both
127 Defaults for the four arguments are, respectively,
128 100, 1, 100, and 1, except that when random data are requested,
130 defaults to a seed depending upon the time of day.
132 is expected to be an unsigned integer,
133 and if given as zero is taken to be infinite.
137 may be given as real numbers or as characters
138 representing the corresponding value in ASCII.
139 The last argument must be a real number.
141 Random numbers are obtained through
150 .Dl "jot 21 \-1 1.00"
151 prints 21 evenly spaced numbers increasing from \-1 to 1.
155 prints the ASCII character set.
158 .Dl "jot \-w xa%c 26 a"
165 .Dl "jot \-r \-c 160 a z | rs \-g 0 8"
166 prints 20 random 8-letter strings.
174 .Dl "jot \-w %ds/old/new/ 30 2 \- 5"
177 substitution commands applying to lines 2, 7, 12, etc.
180 .Dl "jot 0 9 \- \-.5"
181 prints the stuttering sequence 9, 9, 8, 8, 7, etc.
184 .Dl "jot \-b x 512 > block"
185 creates a file containing exactly 1024 bytes.
188 .Dl "expand \-\`jot \-s, \- 10 132 4\`"
189 sets tabs four spaces apart starting
190 from column 10 and ending in column 132.
193 .Dl "grep \`jot \-s """" \-b . 80\`"
194 prints all lines 80 characters or longer.