2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)jot.1 8.1 (Berkeley) 6/6/93
29 .\" $FreeBSD: src/usr.bin/jot/jot.1,v 1.8.2.6 2002/07/15 07:13:13 keramida Exp $
30 .\" $DragonFly: src/usr.bin/jot/jot.1,v 1.2 2003/06/17 04:29:27 dillon Exp $
37 .Nd print sequential or random data
45 .Op Ar reps Op Ar begin Op Ar end Op Ar s
49 utility is used to print out increasing, decreasing, random,
50 or redundant data, usually numbers, one per line.
52 The following options are available:
53 .Bl -tag -width indent
55 Generate random data instead of the default sequential data.
63 with the generated data appended to it.
64 Octal, hexadecimal, exponential,
67 and right-adjusted representations
68 are possible by using the appropriate
70 conversion specification inside
72 in which case the data are inserted rather than appended.
74 This is an abbreviation for
77 Print data separated by
79 Normally, newlines separate data.
81 Do not print the final newline normally appended to the output.
83 Print only as many digits or characters of the data
84 as indicated by the integer
88 the precision is the greater of the precisions of
94 option is overridden by whatever appears in a
100 The last four arguments indicate, respectively,
101 the number of data, the lower bound, the upper bound,
102 and the step size or, for random data, the seed.
103 While at least one of them must appear,
104 any of the other three may be omitted, and
105 will be considered as such if given as
107 Any three of these arguments determines the fourth.
108 If four are specified and the given and computed values of
110 conflict, the lower value is used.
111 If fewer than three are specified, defaults are assigned
112 left to right, except for
114 which assumes its default unless both
120 Defaults for the four arguments are, respectively,
121 100, 1, 100, and 1, except that when random data are requested,
127 argument is expected to be an unsigned integer,
128 and if given as zero is taken to be infinite.
133 arguments may be given as real numbers or as characters
134 representing the corresponding value in
136 The last argument must be a real number.
138 Random numbers are obtained through
151 prints 21 evenly spaced numbers increasing from -1 to 1.
154 character set is generated with
157 and the strings xaa through xaz with
160 while 20 random 8-letter strings are produced with
161 .Dl "jot -r -c 160 a z | rs -g 0 8"
165 may be obtained through
170 substitution commands applying to lines 2, 7, 12, etc. is
172 .Dl jot -w %ds/old/new/ 30 2 - 5
174 The stuttering sequence 9, 9, 8, 8, 7, etc. can be
175 produced by suitable choice of step size,
179 and a file containing exactly 1024 bytes is created with
180 .Dl jot -b x 512 > block
182 Finally, to set tabs four spaces apart starting
183 from column 10 and ending in column 132, use
184 .Dl expand -`jot -s, - 10 132 4`
186 and to print all lines 80 characters or longer,
187 .Dl grep `jot -s \&"\&" -b \&. 80`
189 The following diagnostic messages deserve special explanation:
191 .It "illegal or unsupported format '%s'"
192 The requested conversion format specifier for
195 .Dl %[#][ ][{+,-}][0-9]*[.[0-9]*]?
201 .Dl {c,e,f,g,D,E,G,O,U,X}
202 .It "range error in conversion"
203 A value to be printed fell outside the range of the data type
204 associated with the requested output format.
205 .It "too many conversions"
206 More than one conversion format specifier has been supplied,
207 but only one is allowed.