1
0

doc2ps 338 B

123456789101112131415161718192021
  1. #!/bin/rc
  2. # doc2ps [file.doc] - convert ms word document to postscript
  3. rfork e
  4. fn usage {
  5. echo usage: doc2ps '[file.doc]' >[1=2]
  6. exit usage
  7. }
  8. switch ($#*) {
  9. case 0
  10. file=/tmp/antiword.doc.$pid
  11. fn sigexit { rm $file; exit $s }
  12. cat >$file
  13. case 1
  14. if(~ $1 -*)
  15. usage
  16. file=$1
  17. case *
  18. usage
  19. }
  20. aux/antiword -i0 -p letter $file
  21. s=$status