Initial import from FreeBSD RELENG_4:
[dragonfly.git] / games / quiz / quiz.6
CommitLineData
984263bc
MD
1.\" Copyright (c) 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.\" Jim R. Oldroyd at The Instruction Set.
6.\"
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.
22.\"
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.
34.\"
35.\" @(#)quiz.6 8.1 (Berkeley) 5/31/93
36.\" $FreeBSD: src/games/quiz/quiz.6,v 1.3.2.1 2000/12/08 13:40:05 ru Exp $
37.\"
38.Dd May 31, 1993
39.Dt QUIZ 6
40.Os
41.Sh NAME
42.Nm quiz
43.Nd random knowledge tests
44.Sh SYNOPSIS
45.Nm
46.Op Fl t
47.Op Fl i Ar file
48.Op Ar question answer
49.Sh DESCRIPTION
50The
51.Nm
52utility tests your knowledge of random facts.
53It has a database of subjects from which you can choose.
54With no arguments,
55.Nm
56displays the list of available subjects.
57.Pp
58The options are as follows:
59.Bl -tag -width indent
60.It Fl t
61Use tutorial mode, in which questions are repeated later if you didn't get
62them right the first time, and new questions are presented less frequently
63to help you learn the older ones.
64.It Fl i
65Specify an alternate index file.
66.El
67.Pp
68Subjects are divided into categories.
69You can pick any two categories from the same subject.
70.Nm Quiz
71will ask questions from the first category and it expects answers from
72the second category.
73For example, the command ``quiz victim killer'' asks questions which are
74the names of victims, and expects you to answer with the cause of their
75untimely demise, whereas the command ``quiz killer victim'' works the
76other way around.
77.Pp
78If you get the answer wrong,
79.Nm
80lets you try again.
81To see the right answer, enter a blank line.
82.Sh "Index and Data File Syntax"
83The index and data files have a similar syntax.
84Lines in them consist of several categories separated by colons.
85The categories are regular expressions formed using the following
86meta-characters:
87.Pp
88.Bl -tag -width "pat|pat" -compact -offset indent
89.It pat|pat
90alternate patterns
91.It {pat}
92optional pattern
93.It [pat]
94delimiters, as in pat[pat|pat]pat
95.El
96.Pp
97In an index file, each line represents a subject.
98The first category in each subject is the pathname of the data file for
99the subject.
100The remaining categories are regular expressions for the titles of each
101category in the subject.
102.Pp
103In data files, each line represents a question/answer set.
104Each category is the information for the question/answer for that category.
105.Pp
106The backslash character (``\e'') is used to quote syntactically significant
107characters, or at the end of a line to signify that a continuation line
108follows.
109.Pp
110If either a question or its answer is empty,
111.Nm
112will refrain from asking it.
113.Sh FILES
114.Bl -tag -width /usr/share/games/quiz.db -compact
115.It Pa /usr/share/games/quiz.db
116The default index and data files.
117.El
118.Sh BUGS
119.Nm Quiz
120is pretty cynical about certain subjects.