1 .\" Copyright (c) 1985, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" This code is derived from software contributed to Berkeley by
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of the University nor the names of its contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" @(#)fortune.6 8.3 (Berkeley) 4/19/94
32 .\" $FreeBSD: head/usr.bin/fortune/fortune/fortune.6 277954 2015-01-30 23:26:03Z cperciva $
39 .Nd "print a random, hopefully interesting, adage"
46 .Ar file Ns / Ns Ar directory Ns / Ns Cm all
51 is run with no arguments it prints out a random epigram.
52 Epigrams are divided into several categories, where each category
53 is subdivided into those which are potentially offensive and those
55 The options are as follows:
56 .Bl -tag -width indent
58 Choose from all lists of maxims, both offensive and not.
61 option for more information on offensive fortunes.)
63 Enable additional debugging output.
64 Specify this option multiple times for more verbose output.
65 Only available if compiled with
68 Consider all fortune files to be of equal size (see discussion below
71 Print out the list of files which would be searched, but do not
76 Print out all fortunes which match the regular expression
80 for a description of patterns.
82 Choose only from potentially offensive aphorisms.
84 Please, please, please request a potentially offensive fortune if and
85 only if you believe, deep down in your heart, that you are willing
87 (And that if you are not willing, you will just quit using
90 grief about it, okay?)
92 .Bd -unfilled -offset indent
93 \&... let us keep in mind the basic governing philosophy
94 of The Brotherhood, as handsomely summarized in these words:
95 we believe in healthy, hearty laughter -- at the expense of
96 the whole human race, if needs be. Needs be.
97 --H. Allen Smith, "Rude Jokes"
100 Short apothegms only.
106 Wait before termination for an amount of time calculated from the
107 number of characters in the message.
108 This is useful if it is executed as part of the logout procedure
109 to guarantee that the message can be read before the screen is cleared.
112 The user may specify alternate sayings.
113 You can specify a specific file, a directory which contains one or
114 more files, or the special word
116 which says to use all the standard databases.
117 Any of these may be preceded by a percentage, which is a number
119 between 0 and 100 inclusive, followed by a
121 If it is, there will be a
123 percent probability that an adage will be picked from that file
125 If the percentages do not sum to 100, and there are specifications
126 without percentages, the remaining percent will apply to those files
127 and/or directories, in which case the probability of selecting from
128 one of them will be based on their relative sizes.
130 As an example, given two databases
138 .Dl "fortune funny not-funny"
140 will get you fortunes out of
142 two-thirds of the time.
145 .Dl "fortune 90% funny 10% not-funny"
147 will pick out 90% of its fortunes from
150 .Dq Li "10% not-funny"
151 is unnecessary, since 10% is all that is left).
154 option says to consider all files equal;
157 .Dl "fortune -e funny not-funny"
161 .Dl "fortune 50% funny 50% not-funny"
163 .Bl -tag -width ".Ev FORTUNE_SAVESTATE"
165 The search path for the data files.
166 It is a colon-separated list of directories in which
168 looks for data files.
169 If not set it will default to
170 .Pa /usr/share/games/fortune .
171 If none of the directories specified exist, it will print a warning and exit.
172 .It Ev FORTUNE_SAVESTATE
173 If set, fortune will save some state about what fortune
174 it was up to on disk.
177 .Bl -tag -width ".Pa /usr/share/games/fortune/*"
178 .It Pa /usr/games/fortune
179 .It Pa /usr/share/games/fortune/*
180 the fortunes databases (those files ending
187 .Xr arc4random_uniform 3 ,