OSDN Git Service

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