textutil
Manipulate text files of various formats. tldr-pages
On macOS
macOS
Display information about file.rtf
textutil -info path/to/file.rtfIdentifyConvert file.rtf into file.html
textutil -convert html path/to/file.rtfIdentifyConvert rich text to normal text
textutil path/to/file.rtf -convert txtIdentifyConvert file.txt into file.rtf, using Times 10 for the font
textutil -convert rtf -font Times -fontsize 10 path/to/file.txtIdentifyLoad all RTF files in the current directory, concatenate their contents, and write the result out as index.html with the HTML title set to "Several Files"
textutil -cat html -title "Several Files" -output path/to/index.html *.rtfIdentify