Commit | Line | Data |
---|---|---|
a0be8f19 KB |
1 | .\" Copyright (c) 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | |
dc7f5a19 | 3 | .\" |
a0be8f19 KB |
4 | .\" This code is derived from software contributed to Berkeley by |
5 | .\" Jim R. Oldroyd at The Instruction Set. | |
b9277a41 | 6 | .\" |
a0be8f19 KB |
7 | .\" %sccs.include.redist.roff% |
8 | .\" | |
9 | .\" @(#)quiz.6 6.3 (Berkeley) %G% | |
10 | .\" | |
11 | .Dd | |
12 | .Dt QUIZ 6 | |
13 | .Os | |
14 | .Sh NAME | |
15 | .Nm quiz | |
16 | .Nd random knowledge tests | |
17 | .Sh SYNOPSIS | |
18 | .Nm quiz | |
19 | .Op Fl t | |
20 | .Op Fl i Ar file | |
21 | .Op Ar question answer | |
22 | .Sh DESCRIPTION | |
b9277a41 | 23 | The |
a0be8f19 KB |
24 | .Nm quiz |
25 | utility tests your knowledge of random facts. | |
26 | It has a database of subjects from which you can choose. | |
27 | With no arguments, | |
28 | .Nm quiz | |
29 | displays the list of available subjects. | |
30 | .Pp | |
31 | The options are as follows: | |
32 | .Bl -tag -width indent | |
33 | .It Fl t | |
34 | Use tutorial mode, in which questions are repeated later if you didn't get | |
35 | them right the first time, and new questions are presented less frequently | |
36 | to help you learn the older ones. | |
37 | .It Fl i | |
38 | Specify an alternate index file. | |
39 | .El | |
40 | .Pp | |
41 | Subjects are divided into categories. | |
42 | You can pick any two categories from the same subject. | |
43 | .Nm Quiz | |
44 | will ask questions from the first category and it expects answers from | |
45 | the second category. | |
46 | For example, the command ``quiz victim killer'' asks questions which are | |
47 | the names of victims, and expects you to answer with the cause of their | |
48 | untimely demise, whereas the command ``quiz killer victim'' works the | |
49 | other way around. | |
50 | .Pp | |
51 | If you get the answer wrong, | |
52 | .Nm quiz | |
53 | lets you try again. | |
54 | To see the right answer, enter a blank line. | |
55 | .Sh "Index and Data File Syntax" | |
56 | The index and data files have a similar syntax. | |
57 | Lines in them consist of several categories separated by colons. | |
58 | The categories are regular expressions formed using the following | |
59 | meta-characters: | |
60 | .sp | |
61 | .Bl -tag -width "pat|pat" -compact -offset indent | |
62 | .It pat|pat | |
63 | alternate patterns | |
64 | .It {pat} | |
65 | optional pattern | |
66 | .It [pat] | |
67 | delimiters, as in pat[pat|pat]pat | |
68 | .El | |
69 | .Pp | |
70 | In an index file, each line represents a subject. | |
71 | The first category in each subject is the pathname of the data file for | |
72 | the subject. | |
73 | The remaining categories are regular expressions for the titles of each | |
74 | category in the subject. | |
75 | .Pp | |
76 | In data files, each line represents a question/answer set. | |
77 | Each category is the information for the question/answer for that category. | |
78 | .Pp | |
79 | The backslash character (``\e'') is used to quote syntactically significant | |
80 | characters, or at the end of a line to signify that a continuation line | |
81 | follows. | |
82 | .Pp | |
83 | If either a question or its answer is empty, | |
84 | .Nm quiz | |
b9277a41 | 85 | will refrain from asking it. |
a0be8f19 KB |
86 | .Sh FILES |
87 | .Bl -tag -width /usr/share/games/quiz.db -compact | |
88 | .It Pa /usr/share/games/quiz.db | |
89 | The default index and data files. | |
90 | .El | |
91 | .Sh BUGS | |
92 | .Nm Quiz | |
93 | is pretty cynical about certain subjects. |