Convert foo.rtf into foo.html

textutil

textutil -convert {{html}} {{foo.rtf}}

click the source code to copy