]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - quiz/quiz.6
Lots of minor fixes resulting from reading these man pages in detail.
[bsdgames-darwin.git] / quiz / quiz.6
1 .\" $NetBSD: quiz.6,v 1.9 2002/09/26 18:32:03 wiz Exp $
2 .\"
3 .\" Copyright (c) 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
5 .\"
6 .\" This code is derived from software contributed to Berkeley by
7 .\" Jim R. Oldroyd at The Instruction Set.
8 .\"
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
17 .\" 3. All advertising materials mentioning features or use of this software
18 .\" must display the following acknowledgement:
19 .\" This product includes software developed by the University of
20 .\" California, Berkeley and its contributors.
21 .\" 4. Neither the name of the University nor the names of its contributors
22 .\" may be used to endorse or promote products derived from this software
23 .\" without specific prior written permission.
24 .\"
25 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .\" SUCH DAMAGE.
36 .\"
37 .\" @(#)quiz.6 8.1 (Berkeley) 5/31/93
38 .\"
39 .Dd May 31, 1993
40 .Dt QUIZ 6
41 .Os
42 .Sh NAME
43 .Nm quiz
44 .Nd random knowledge tests
45 .Sh SYNOPSIS
46 .Nm
47 .Op Fl t
48 .Op Fl i Ar file
49 .Op Ar question answer
50 .Sh DESCRIPTION
51 The
52 .Nm
53 utility tests your knowledge of random facts.
54 It has a database of subjects from which you can choose.
55 With no arguments,
56 .Nm
57 displays the list of available subjects.
58 .Pp
59 The options are as follows:
60 .Bl -tag -width indent
61 .It Fl t
62 Use tutorial mode, in which questions are repeated later if you didn't get
63 them right the first time, and new questions are presented less frequently
64 to help you learn the older ones.
65 .It Fl i
66 Specify an alternative index file.
67 .El
68 .Pp
69 Subjects are divided into categories.
70 You can pick any two categories from the same subject.
71 .Nm
72 will ask questions from the first category and it expects answers from
73 the second category.
74 For example, the command
75 .Dq quiz victim killer
76 asks questions which are the names of victims, and expects you to answer
77 with the cause of their untimely demise, whereas the command
78 .Dq quiz killer victim
79 works the other way around.
80 .Pp
81 If you get the answer wrong,
82 .Nm
83 lets you try again.
84 To see the right answer, enter a blank line.
85 .Ss Index and Data File Syntax
86 The index and data files have a similar syntax.
87 Lines in them consist of several categories separated by colons.
88 The categories are regular expressions formed using the following
89 meta-characters:
90 .sp
91 .Bl -tag -width "pat|pat" -compact -offset indent
92 .It pat|pat
93 alternative patterns
94 .It {pat}
95 optional pattern
96 .It [pat]
97 delimiters, as in pat[pat|pat]pat
98 .El
99 .Pp
100 In an index file, each line represents a subject.
101 The first category in each subject is the pathname of the data file for
102 the subject.
103 The remaining categories are regular expressions for the titles of each
104 category in the subject.
105 .Pp
106 In data files, each line represents a question/answer set.
107 Each category is the information for the question/answer for that category.
108 .Pp
109 The backslash character (``\e'') is used to quote syntactically significant
110 characters, or at the end of a line to signify that a continuation line
111 follows.
112 .Pp
113 If either a question or its answer is empty,
114 .Nm
115 will refrain from asking it.
116 .Sh FILES
117 .Bl -tag -width /usr/share/games/quiz.db -compact
118 .It Pa /usr/share/games/quiz.db
119 The default index and data files.
120 .El
121 .Sh BUGS
122 .Nm
123 is pretty cynical about certain subjects.