chdir /usr/doc/MP119
if $1x = helpx goto helpx
if $1x = x goto helpx
: loop
if $1x = x exit
if $1x = tocx goto tocx
if $1x = unit1x goto unit1x
if $1x = unit2x goto unit2x
if $1x = unit3x goto unit3x
if $1x = unit4x goto unit4x
if $1x = coursemanx goto guide
if $1x = finalx goto final-exam
if $1x = finalansx goto final-exam-ans
if $1x = allx goto allx
if $1x = printx goto printx
exit

: helpx
echo " "
echo "The following are the valid arguements to "Print" used in"
echo "obtaining all or part of MP119:"
echo "unit1     for Unit I: Gaining access, inter-user communication, file"
echo "              manipulation and utility programs"
echo "unit2     for Unit II: Internal structure, manipulating directories"
echo "unit3     for Unit III: Unix text editor, nroff, and text formatting"
echo "unit4     for Unit IV: The Rand editor"
echo "courseman for the course manual: includes the answers to the"
echo "          proficiency tests and the final exam"
echo "final     for a copy of the final exam"
echo "finalans  for a copy of the answers to the final exam"
echo "toc       for a copy of the table of contents"
echo "print     for a nroff'ed copy to be sent to the line printer"
echo "          optional second argument ( e.g. -p1 ) used to specify"
echo "          which printer if not standard"
exit

: allx
nroff -mnm unit1? unit2? unit3? unit4? final-exam guide
shift
goto loop

: unit1x
nroff -mnm unit1?
shift
goto loop

: unit2x
nroff -mnm unit2?
shift
goto loop

: unit3x
nroff -mnm unit3?
shift
goto loop

: unit4x
nroff -mnm unit4?
shift
goto loop

: guide
nroff -mnm final-exam guide
shift
goto loop

: final-exam
nroff -mnm final-exam
shift
goto loop

: final-exam-ans
nroff -mnm final-exam-ans
shift
goto loop

: tocx
nroff -mnm unit10
shift
goto loop

: printx
if $2x = x echo assume standard printer
opr $2 savu[1234] savfin savman
exit

: Comments: This is the shell file "Print." Its purpose is to provide copies
: of MP-119 or parts thereof. The file is used in the following manner.
: To obtain a printed copy of the entire document you simply type
: "Print all|opr." If it's only the course manual that you want simply
: type "Print courseman|opr." If you don't know what arguement to use to
: obtain what you want type "Print help" and a "menu" of arguements will be
: displayed.

