1.\" Copyright (c) 1985, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Ken Arnold. 6.\" 7.\" %sccs.include.redist.man% 8.\" 9.\" @(#)fortune.6 8.3 (Berkeley) 04/19/94 10.\" 11.Dd 12.Dt FORTUNE 6 13.Os BSD 4 14.Sh NAME 15.Nm fortune 16.Nd "print a random, hopefully interesting, adage" 17.Sh SYNOPSIS 18.Nm fortune 19.Op Fl aefilosw 20.Op Fl m Ar pattern 21.Oo 22.Op Ar \&N% 23.Ar file/dir/all 24.Oc 25.Sh DESCRIPTION 26When 27.Nm fortune 28is run with no arguments it prints out a random epigram. 29Epigrams are divided into several categories, where each category 30is subdivided into those which are potentially offensive and those 31which are not. 32The options are as follows: 33.Bl -tag -width flag 34.It Fl a 35Choose from all lists of maxims, both offensive and not. 36(See the 37.Fl o 38option for more information on offensive fortunes.) 39.It Fl e 40Consider all fortune files to be of equal size (see discussion below 41on multiple files). 42.It Fl f 43Print out the list of files which would be searched, but don't 44print a fortune. 45.It Fl l 46Long dictums only. 47.It Fl m 48Print out all fortunes which match the regular expression 49.Ar pattern . 50See 51.Xr regex 3 52for a description of patterns. 53.It Fl o 54Choose only from potentially offensive aphorisms. 55.Bf -symbolic 56Please, please, please request a potentially offensive fortune if and 57only if you believe, deep down in your heart, that you are willing 58to be offended. 59(And that if you are, you'll just quit using 60.Fl o 61rather than give us 62grief about it, okay?) 63.Ef 64.Bd -filled -offset indent 65\&... let us keep in mind the basic governing philosophy 66of The Brotherhood, as handsomely summarized in these words: 67we believe in healthy, hearty laughter -- at the expense of 68the whole human race, if needs be. 69Needs be. 70.Bd -filled -offset indent-two -compact 71--H. Allen Smith, "Rude Jokes" 72.Ed 73.Ed 74.It Fl s 75Short apothegms only. 76.It Fl i 77Ignore case for 78.Fl m 79patterns. 80.It Fl w 81Wait before termination for an amount of time calculated from the 82number of characters in the message. 83This is useful if it is executed as part of the logout procedure 84to guarantee that the message can be read before the screen is cleared. 85.El 86.Pp 87The user may specify alternate sayings. 88You can specify a specific file, a directory which contains one or 89more files, or the special word 90.Em all 91which says to use all the standard databases. 92Any of these may be preceded by a percentage, which is a number 93.Ar N 94between 0 and 100 inclusive, followed by a 95.Ar % . 96If it is, there will be a 97.Ar N 98percent probability that an adage will be picked from that file 99or directory. 100If the percentages do not sum to 100, and there are specifications 101without percentages, the remaining percent will apply to those files 102and/or directories, in which case the probability of selecting from 103one of them will be based on their relative sizes. 104.Pp 105As an example, given two databases 106.Em funny 107and 108.Em not-funny , 109with 110.Em funny 111twice as big, saying 112.Bd -literal -offset indent 113fortune funny not-funny 114.Ed 115.Pp 116will get you fortunes out of 117.Em funny 118two-thirds of the time. 119The command 120.Bd -literal -offset indent 121fortune 90% funny 10% not-funny 122.Ed 123.Pp 124will pick out 90% of its fortunes from 125.Em funny 126(the ``10% not-funny'' is unnecessary, since 10% is all that's left). 127The 128.Fl e 129option says to consider all files equal; 130thus 131.Bd -literal -offset indent 132fortune -e 133.Ed 134.Pp 135is equivalent to 136.Bd -literal -offset indent 137fortune 50% funny 50% not 138.Em -funny 139.Ed 140.Sh FILES 141.Bl -tag -width Pa -compact 142.It Pa /usr/share/games/fortune 143.El 144.Sh SEE ALSO 145.Xr regex 3 , 146.Xr regcmp 3 , 147