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