1 #!/bin/sh 2 3 ######################################################################## 4 # 5 # Convert an rtf document to plain text format using 'Ted'. 6 # 7 # Usage rtf2txt.sh something.rtf something.txt 8 # 9 # This is an example. Refer to http://www.nllgg.nl/Ted/index.html for the 10 # 'Ted' documentation. 11 # 12 ######################################################################## 13 14 case $# in 15 1) 16 rtf="$1"; 17 txt=`basename "$1" .rtf`.txt 18 ;; 19 2) 20 rtf="$1"; 21 txt="$2"; 22 ;; 23 *) 24 echo $0: '$#='$# 25 exit 1 26 ;; 27 esac 28 29 Ted --saveTo "$rtf" "$txt" 30