|
|
1.1 root 1: .TH JOT 1 "15 May 1983"
2: .UC 4
3: .SH NAME
4: jot \- print sequential or random data
5: .SH SYNOPSIS
6: .B jot [
7: options
8: .B ] [
9: \fRreps \fB[\fP begin \fB[\fP end \fB[\fP s \fB] ] ] ]\fP
10: .SH DESCRIPTION
11: .I Jot
12: is used to print out increasing, decreasing, random,
13: or redundant data, usually numbers, one per line.
14: The
15: .I options
16: are understood as follows.
17: .IP \fB\-r\fP
18: Generate random data instead of sequential data, the default.
19: .IP \fB\-b\fP\ word
20: Just print
21: .I word
22: repetitively.
23: .IP \fB\-w\fP\ word
24: Print
25: .IR word
26: with the generated data appended to it.
27: Octal, hexadecimal, exponential, ASCII, zero padded,
28: and right-adjusted representations
29: are possible by using the appropriate
30: .IR printf (3)
31: conversion specification inside
32: .IR word ,
33: in which case the data are inserted rather than appended.
34: .IP \fB\-c\fP
35: This is an abbreviation for \fB\-w %c\fP.
36: .IP \fB\-s\fP\ string
37: Print data separated by
38: .IR string .
39: Normally, newlines separate data.
40: .IP \fB\-n\fP
41: Do not print the final newline normally appended to the output.
42: .IP \fB\-p\fP\ precision
43: Print only as many digits or characters of the data
44: as indicated by the integer
45: .IR precision .
46: In the absence of
47: .BR \-p ,
48: the precision is the greater of the precisions of
49: .I begin
50: and
51: .IR end .
52: The
53: .B \-p
54: option is overridden by whatever appears in a
55: .IR printf (3)
56: conversion following
57: .BR \-w .
58: .PP
59: The last four arguments indicate, respectively,
60: the number of data, the lower bound, the upper bound,
61: and the step size or, for random data, the seed.
62: While at least one of them must appear,
63: any of the other three may be omitted, and
64: will be considered as such if given as
65: .BR \- .
66: Any three of these arguments determines the fourth.
67: If four are specified and the given and computed values of
68: .I reps
69: conflict, the lower value is used.
70: If fewer than three are specified, defaults are assigned
71: left to right, except for
72: .IR s ,
73: which assumes its default unless both
74: .I begin
75: and
76: .I end
77: are given.
78: .PP
79: Defaults for the four arguments are, respectively,
80: 100, 1, 100, and 1, except that when random data are requested,
81: .I s
82: defaults to a seed depending upon the time of day.
83: .I Reps
84: is expected to be an unsigned integer,
85: and if given as zero is taken to be infinite.
86: .I Begin
87: and
88: .I end
89: may be given as real numbers or as characters
90: representing the corresponding value in ASCII.
91: The last argument must be a real number.
92: .PP
93: Random numbers are obtained through
94: .IR random (3).
95: The name
96: .I jot
97: derives in part from
98: .IR iota ,
99: a function in APL.
100: .SH EXAMPLES
101: .de IC
102: .IP
103: .ss 36
104: .ft B
105: ..
106: .de NC
107: .br
108: .ss 12
109: .PP
110: ..
111: .PP
112: The command
113: .IC
114: jot 21 \-1 1.00
115: .NC
116: prints 21 evenly spaced numbers increasing from \-1 to 1.
117: The ASCII character set is generated with
118: .IC
119: jot \-c 128 0
120: .NC
121: and the strings xaa through xaz with
122: .IC
123: jot \-w xa%c 26 a
124: .NC
125: while 20 random 8-letter strings are produced with
126: .IC
127: jot \-r \-c 160 a z | rs \-g 0 8
128: .NC
129: Infinitely many
130: .IR yes 's
131: may be obtained through
132: .IC
133: jot \-b yes 0
134: .NC
135: and thirty
136: .IR ed (1)
137: substitution commands applying to lines 2, 7, 12, etc. is
138: the result of
139: .IC
140: jot \-w %ds/old/new/ 30 2 \- 5
141: .NC
142: The stuttering sequence 9, 9, 8, 8, 7, etc. can be
143: produced by suitable choice of precision and step size,
144: as in
145: .IC
146: jot 0 9 \- \-.5
147: .NC
148: and a file containing exactly 1024 bytes is created with
149: .IC
150: jot \-b x 512 > block
151: .NC
152: Finally, to set tabs four spaces apart starting
153: from column 10 and ending in column 132, use
154: .IC
155: expand \-\`jot \-s, \- 10 132 4\`
156: .NC
157: and to print all lines 80 characters or longer,
158: .IC
159: grep \`jot \-s "" \-b . 80\`
160: .NC
161: .SH SEE ALSO
162: rs(1), ed(1), yes(1), printf(3), random(3), expand(1)
163: .SH AUTHOR
164: John Kunze
165: .SH BUGS
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.