home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / www / src / print-www / html-to-latex < prev    next >
Encoding:
Text File  |  1992-11-04  |  487 b   |  39 lines

  1. #!/bin/csh
  2.  
  3. set in = $1
  4.  
  5. if ("$in" == "" ) then
  6.  set in = "-"
  7. endif
  8. if ($#argv > 0) shift
  9.  
  10. set out = ""
  11.  
  12. while ($#argv > 0 && "$1" =~ -*)
  13.  switch ($1)
  14.  case -o:
  15.    shift
  16.    if ($#argv < 1) goto usage
  17.    set out = $1
  18.    shift
  19.    breaksw
  20.  default:
  21.     goto usage
  22.     breaksw
  23.  endsw
  24. end
  25.  
  26.  
  27. if ("$out"  == "") then
  28.  cat $in | sed -f $WWW/bin/html2latex.sed 
  29. else
  30.  cat $in | sed -f $WWW/bin/html2latex.sed > $out
  31. endif
  32. exit 0
  33.  
  34. usage:
  35.  echo "Usage: `basename $0` [INPUT] [-o OUTPUT]"
  36.  exit 1
  37.  
  38.  
  39.