11

Can anyone recommend software (preferably freeware) for batch converting rtf files to txt files on Unix?

Hennes
  • 65,804
  • 7
  • 115
  • 169
Fred
  • 119

4 Answers4

6

There are many different ones, here are the ones I've tested successfully (all open source and free):

  • unrtf
  • wv
  • unoconv
Thor
  • 6,763
  • 1
  • 40
  • 44
4

You didn't mention what flavour of UNIX but I think there's a textutil on many.

http://www.unix.com/man-page/All/1/TEXTUTIL/

 -convert fmt  Convert the specified files to the indicated format and
       write each one back to the file system.

       fmt is one of:  txt, html, rtf, rtfd, doc, docx, wordml,
               odt, or webarchive
mockman
  • 216
3

There is "unrtf", but while the Ubuntu package data claims that it can create text output, the GNU unrtf homepage does not mention that format. But perhaps you can try that.

jstarek
  • 1,007
  • 8
  • 22
2

A quick glance at an RTF file suggests that RTF markup is anything between {braces} and anything between a backslash and a space \markup. So maybe strings and a short sed/awk/perl script to delete markup would get you close to plain text.