home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume12 / psf2 / part01 / psnroff < prev    next >
Encoding:
Text File  |  1990-05-19  |  768 b   |  34 lines

  1. :
  2. #    Print nroff'ed pages using psf filters
  3. #
  4. #    The "-r 3" option in pnf below removes 3 blank lines between
  5. #    pages (to allow correct printing in the imageable area of the
  6. #    postscript printer).  Different printers may require different
  7. #    number of lines to remove.  (see pnf.1)
  8.  
  9. #    If double sided printing is desired, use the "-d" option
  10. #    in psf below.
  11.  
  12. case $# in
  13. 0)    echo "Usage:  $0 [nroff options] doc.nroff ..."
  14.     echo "  e.g.  $0 -ms document.ms"
  15.     exit 0 ;;
  16. esac
  17.  
  18. for i in $*
  19. do
  20.     case $i in
  21.     -*)      OPTIONS=`echo $OPTIONS $i`
  22.          shift;;
  23.          
  24.     [1-z]*)  if test -f $i
  25.              then
  26.              nroff $OPTIONS $i | pnf -i -r 3 | psf -2 | lp ;
  27.              else
  28.                    echo "$0: file $i does not exist."
  29.              fi
  30.              ;;
  31.     esac
  32. done
  33. exit 0
  34.