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