chdir /man/man
if -r man$1 goto shift$1
goto shift0

: shift1
shift
: shift0
if $1x = x exit
if ! -r man1/$1.1 goto error1
nroff -h man0/naa man1/$1.1
goto shift1

: error1
echo $1.1 not found
goto shift1

: shift2
shift
if $1x = x exit
if ! -r man2/$1.2 goto error2
nroff -h man0/naa man2/$1.2
goto shift2

: error2
echo $1.2 not found
goto shift2

: shift3
shift
if $1x = x exit
if ! -r man3/$1.3 goto error3
nroff -h man0/naa man3/$1.3
goto shift3

: error3
echo $1.3 not found
goto shift3

: shift4
shift
if $1x = x exit
if ! -r man4/$1.4 goto error4
nroff -h man0/naa man4/$1.4
goto shift4

: error4
echo $1.4 not found
goto shift4

: shift5
shift
if $1x = x exit
if ! -r man5/$1.5 goto error5
nroff -h man0/naa man5/$1.5
goto shift5

: error5
echo $1.5 not found
goto shift5

: shift6
shift
if $1x = x exit
if ! -r man6/$1.6 goto error6
nroff -h man0/naa man6/$1.6
goto shift6

: error6
echo $1.6 not found
goto shift6

: shift7
shift
if $1x = x exit
if ! -r man7/$1.7 goto error7
nroff -h man0/naa man7/$1.7
goto shift7

: error7
echo $1.7 not found
goto shift7

: shift8
shift
if $1x = x exit
if ! -r man8/$1.8 goto error8
nroff -h man0/naa man8/$1.8
goto shift8

: error8
echo $1.8 not found
goto shift8
