4.4BSD/usr/share/man/cat1/jot.0
JOT(1) BSD Reference Manual JOT(1)
NNAAMMEE
jot - print sequential or random data
SSYYNNOOPPSSIISS
jjoott [[ options ]] [[ reps [[ begin [[ end [[ s ]] ]] ]] ]]
DDEESSCCRRIIPPTTIIOONN
_J_o_t is used to print out increasing, decreasing, random,
or redundant data, usually numbers, one per line. The
_o_p_t_i_o_n_s are understood as follows.
--rr Generate random data instead of sequential data,
the default.
--bb word
Just print _w_o_r_d repetitively.
--ww word
Print _w_o_r_d with the generated data appended to it.
Octal, hexadecimal, exponential, ASCII, zero
padded, and right-adjusted representations are pos-
sible by using the appropriate _p_r_i_n_t_f(3) conversion
specification inside _w_o_r_d, in which case the data
are inserted rather than appended.
--cc This is an abbreviation for --ww %%cc.
--ss string
Print data separated by _s_t_r_i_n_g. Normally, newlines
separate data.
--nn Do not print the final newline normally appended to
the output.
--pp precision
Print only as many digits or characters of the data
as indicated by the integer _p_r_e_c_i_s_i_o_n. In the
absence of --pp, the precision is the greater of the
precisions of _b_e_g_i_n and _e_n_d. The --pp option is
overridden by whatever appears in a _p_r_i_n_t_f(3) con-
version following --ww.
The last four arguments indicate, respectively, the number
of data, the lower bound, the upper bound, and the step
size or, for random data, the seed. While at least one of
them must appear, any of the other three may be omitted,
and will be considered as such if given as --. Any three
of these arguments determines the fourth. If four are
specified and the given and computed values of _r_e_p_s con-
flict, the lower value is used. If fewer than three are
specified, defaults are assigned left to right, except for
4th Berkeley Distribution June 6, 1993 1
JOT(1) BSD Reference Manual JOT(1)
_s, which assumes its default unless both _b_e_g_i_n and _e_n_d are
given.
Defaults for the four arguments are, respectively, 100, 1,
100, and 1, except that when random data are requested, _s
defaults to a seed depending upon the time of day. _R_e_p_s
is expected to be an unsigned integer, and if given as
zero is taken to be infinite. _B_e_g_i_n and _e_n_d may be given
as real numbers or as characters representing the corre-
sponding value in ASCII. The last argument must be a real
number.
Random numbers are obtained through _r_a_n_d_o_m(3). The name
_j_o_t derives in part from _i_o_t_a, a function in APL.
EEXXAAMMPPLLEESS
The command
jjoott 2211 --11 11..0000
prints 21 evenly spaced numbers increasing from -1 to 1.
The ASCII character set is generated with
jjoott --cc 112288 00
and the strings xaa through xaz with
jjoott --ww xxaa%%cc 2266 aa
while 20 random 8-letter strings are produced with
jjoott --rr --cc 116600 aa zz || rrss --gg 00 88
Infinitely many _y_e_s's may be obtained through
jjoott --bb yyeess 00
and thirty _e_d(1) substitution commands applying to lines
2, 7, 12, etc. is the result of
jjoott --ww %%ddss//oolldd//nneeww// 3300 22 -- 55
The stuttering sequence 9, 9, 8, 8, 7, etc. can be pro-
duced by suitable choice of precision and step size, as in
jjoott 00 99 -- --..55
and a file containing exactly 1024 bytes is created with
jjoott --bb xx 551122 >> bblloocckk
4th Berkeley Distribution June 6, 1993 2
JOT(1) BSD Reference Manual JOT(1)
Finally, to set tabs four spaces apart starting from col-
umn 10 and ending in column 132, use
eexxppaanndd --``jjoott --ss,, -- 1100 113322 44``
and to print all lines 80 characters or longer,
ggrreepp ``jjoott --ss """" --bb .. 8800``
SSEEEE AALLSSOO
ed(1), expand(1), rs(1), yes(1), printf(3), random(3),
expand(1)
4th Berkeley Distribution June 6, 1993 3