------------------------------------------------------------------------ textutils ------------------------------------------------------------------------ formats: text, html, rtf, rtfd, docx, doc, odt, webarchive #strip out html baggage $ textutil -convert txt LongFile.html By default textutil will write a file "LongFile.txt". If you want to stream the answer then $ textutil -convert txt -stdout LongFile.html If you want to use it in a pipe setting then you need to state "stdin" $ .... | textutil -convert txt -stdin -stdout $ textutil -info file(s) #information on the file $ textutil -cat -convert txt *.html #convert to txt and concatenate to convert pdf to txt use "ps2ascii" Batch execution $ for i in $(ls *.doc);do textutil -convert txt $i;done $ find . -name *.doc -exec textutil -convert txt '{}' \;