#!  /bin/csh -f
#

if ($#argv == 0) then
  set m=(1 3 5 8)
else
  set m=($*)
endif


echo "  This file prints out all NEMO MAN pages ($m)."
echo "  This command will tie-up the printer for a long time"
echo ""
echo -n "  Enter <y> to continue, any other will abort:"
set answer = $<
if ( $answer != "y" ) then
   exit
endif

echo "Hang on, be sure you're printer has enough paper"
sleep 3

foreach l ($m)
  foreach file ($NEMO/man/man$l/*.$l)
    if (-f $file) then
      set wc=(`wc $file`)
      set wcl=$wc[1]
      if ($wcl > 5) then
	echo "Printing $file ($wcl lines)"
      	manlaser $file
      else
        echo   "Skipping $file ($wcl lines)"
      endif
    else
      echo   "Skipping $file (no real file)"
    endif
  end
end
