Преобразовать зараренный ртф в зазипованный тхт
unrar, catdoc и zip тебе в помощь.
Это типа rtf2tex |texi2dvi4a2ps |a2ps?
for arch in `find -name "*.rar" -maepth 1 -type f`;
do
arch=`sed 's/\.[^.]*$//' <<< $arch`;
unrar e $arch.rar;
for text in `find -name "*.rtf" -maepth 1 -type f`;
do
text=`sed 's/\.[^.]*$//' <<< $text`;
catdoc -w -d koi8-r $text.rtf > $text.txt;
done;
find -name "*.txt" -maepth 1 -type f | zip -9 $arch.zip -@;
find -name "*.txt" -maepth 1 -type f -exec rm -f '{}' ';';
find -name "*.rtf" -maepth 1 -type f -exec rm -f '{}' ';';
done
Оставить комментарий
and-guzij
Нужно все зараренные ртф в папке превратить в зазипованные тхт. Как это проще всего сделать?