Commit | Line | Data |
---|---|---|
b4b4c129 KB |
1 | .\" Copyright (c) 1985, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
be24db95 | 3 | .\" |
38562346 KB |
4 | .\" This code is derived from software contributed to Berkeley by |
5 | .\" Ken Arnold. | |
6 | .\" | |
ad787160 C |
7 | .\" Redistribution and use in source and binary forms, with or without |
8 | .\" modification, are permitted provided that the following conditions | |
9 | .\" are met: | |
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. All advertising materials mentioning features or use of this software | |
16 | .\" must display the following acknowledgement: | |
17 | .\" This product includes software developed by the University of | |
18 | .\" California, Berkeley and its contributors. | |
19 | .\" 4. Neither the name of the University nor the names of its contributors | |
20 | .\" may be used to endorse or promote products derived from this software | |
21 | .\" without specific prior written permission. | |
94c01391 | 22 | .\" |
ad787160 C |
23 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
24 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
25 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
26 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
27 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
28 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
29 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | .\" SUCH DAMAGE. | |
be24db95 | 34 | .\" |
ed554bc5 | 35 | .\" @(#)fortune.6 8.3 (Berkeley) 4/19/94 |
ad787160 | 36 | .\" |
ed554bc5 | 37 | .Dd April 19, 1994 |
d77d25ce CL |
38 | .Dt FORTUNE 6 |
39 | .Os BSD 4 | |
40 | .Sh NAME | |
41 | .Nm fortune | |
42 | .Nd "print a random, hopefully interesting, adage" | |
43 | .Sh SYNOPSIS | |
44 | .Nm fortune | |
45 | .Op Fl aefilosw | |
46 | .Op Fl m Ar pattern | |
47 | .Oo | |
48 | .Op Ar \&N% | |
49 | .Ar file/dir/all | |
50 | .Oc | |
51 | .Sh DESCRIPTION | |
340543d7 | 52 | When |
d77d25ce | 53 | .Nm fortune |
38562346 | 54 | is run with no arguments it prints out a random epigram. |
fbfe53a8 KB |
55 | Epigrams are divided into several categories, where each category |
56 | is subdivided into those which are potentially offensive and those | |
57 | which are not. | |
38562346 | 58 | The options are as follows: |
d77d25ce CL |
59 | .Bl -tag -width flag |
60 | .It Fl a | |
fbfe53a8 | 61 | Choose from all lists of maxims, both offensive and not. |
c53bde95 KB |
62 | (See the |
63 | .Fl o | |
64 | option for more information on offensive fortunes.) | |
d77d25ce | 65 | .It Fl e |
38562346 KB |
66 | Consider all fortune files to be of equal size (see discussion below |
67 | on multiple files). | |
d77d25ce | 68 | .It Fl f |
38562346 KB |
69 | Print out the list of files which would be searched, but don't |
70 | print a fortune. | |
d77d25ce | 71 | .It Fl l |
38562346 | 72 | Long dictums only. |
d77d25ce | 73 | .It Fl m |
340543d7 | 74 | Print out all fortunes which match the regular expression |
d77d25ce | 75 | .Ar pattern . |
340543d7 | 76 | See |
d77d25ce | 77 | .Xr regex 3 |
38562346 | 78 | for a description of patterns. |
d77d25ce | 79 | .It Fl o |
fbfe53a8 | 80 | Choose only from potentially offensive aphorisms. |
d77d25ce | 81 | .Bf -symbolic |
fbfe53a8 KB |
82 | Please, please, please request a potentially offensive fortune if and |
83 | only if you believe, deep down in your heart, that you are willing | |
388d6e7f | 84 | to be offended. |
d77d25ce CL |
85 | (And that if you are, you'll just quit using |
86 | .Fl o | |
87 | rather than give us | |
fbfe53a8 | 88 | grief about it, okay?) |
d77d25ce CL |
89 | .Ef |
90 | .Bd -filled -offset indent | |
388d6e7f KB |
91 | \&... let us keep in mind the basic governing philosophy |
92 | of The Brotherhood, as handsomely summarized in these words: | |
93 | we believe in healthy, hearty laughter -- at the expense of | |
94 | the whole human race, if needs be. | |
95 | Needs be. | |
d77d25ce CL |
96 | .Bd -filled -offset indent-two -compact |
97 | --H. Allen Smith, "Rude Jokes" | |
98 | .Ed | |
99 | .Ed | |
100 | .It Fl s | |
38562346 | 101 | Short apothegms only. |
d77d25ce | 102 | .It Fl i |
340543d7 | 103 | Ignore case for |
d77d25ce | 104 | .Fl m |
340543d7 | 105 | patterns. |
d77d25ce | 106 | .It Fl w |
38562346 KB |
107 | Wait before termination for an amount of time calculated from the |
108 | number of characters in the message. | |
109 | This is useful if it is executed as part of the logout procedure | |
110 | to guarantee that the message can be read before the screen is cleared. | |
d77d25ce CL |
111 | .El |
112 | .Pp | |
340543d7 | 113 | The user may specify alternate sayings. |
38562346 KB |
114 | You can specify a specific file, a directory which contains one or |
115 | more files, or the special word | |
d77d25ce | 116 | .Em all |
340543d7 | 117 | which says to use all the standard databases. |
38562346 | 118 | Any of these may be preceded by a percentage, which is a number |
d77d25ce | 119 | .Ar N |
38562346 | 120 | between 0 and 100 inclusive, followed by a |
d77d25ce | 121 | .Ar % . |
38562346 | 122 | If it is, there will be a |
d77d25ce | 123 | .Ar N |
38562346 KB |
124 | percent probability that an adage will be picked from that file |
125 | or directory. | |
126 | If the percentages do not sum to 100, and there are specifications | |
127 | without percentages, the remaining percent will apply to those files | |
128 | and/or directories, in which case the probability of selecting from | |
129 | one of them will be based on their relative sizes. | |
d77d25ce | 130 | .Pp |
38562346 | 131 | As an example, given two databases |
d77d25ce | 132 | .Em funny |
340543d7 | 133 | and |
d77d25ce | 134 | .Em not-funny , |
340543d7 | 135 | with |
d77d25ce | 136 | .Em funny |
38562346 | 137 | twice as big, saying |
d77d25ce | 138 | .Bd -literal -offset indent |
340543d7 | 139 | fortune funny not-funny |
d77d25ce CL |
140 | .Ed |
141 | .Pp | |
340543d7 | 142 | will get you fortunes out of |
d77d25ce | 143 | .Em funny |
340543d7 KB |
144 | two-thirds of the time. |
145 | The command | |
d77d25ce | 146 | .Bd -literal -offset indent |
340543d7 | 147 | fortune 90% funny 10% not-funny |
d77d25ce CL |
148 | .Ed |
149 | .Pp | |
340543d7 | 150 | will pick out 90% of its fortunes from |
d77d25ce | 151 | .Em funny |
fbfe53a8 | 152 | (the ``10% not-funny'' is unnecessary, since 10% is all that's left). |
340543d7 | 153 | The |
d77d25ce | 154 | .Fl e |
340543d7 KB |
155 | option says to consider all files equal; |
156 | thus | |
d77d25ce CL |
157 | .Bd -literal -offset indent |
158 | fortune -e | |
159 | .Ed | |
160 | .Pp | |
340543d7 | 161 | is equivalent to |
d77d25ce | 162 | .Bd -literal -offset indent |
107786a6 KB |
163 | fortune 50% funny 50% not |
164 | .Em -funny | |
d77d25ce CL |
165 | .Ed |
166 | .Sh FILES | |
167 | .Bl -tag -width Pa -compact | |
168 | .It Pa /usr/share/games/fortune | |
169 | .El | |
d77d25ce CL |
170 | .Sh SEE ALSO |
171 | .Xr regex 3 , | |
172 | .Xr regcmp 3 , |