doc2ps 244 B

12345678910111213141516
  1. #!/bin/rc
  2. rfork e
  3. if(! ~ $#* 0 1 && ~ $1 -*){
  4. echo 'usage: doc2ps file.doc' >[1=2]
  5. exit usage
  6. }
  7. file=$1
  8. if(~ $#* 0){
  9. file=/tmp/antiword.doc.$pid
  10. cat >$file
  11. }
  12. aux/antiword -i0 -p letter $file
  13. s=$status
  14. if(~ $#* 0)
  15. rm -f $file
  16. exit $status