Pandoc is a universal document converter. With it, you can convert between various flavors of Markdown, Textile, HTML, LaTeX and Word docx.


brew install pandoc


Convert Markdown to Textile

pandoc --from markdown --to textile -o FileTo.txt

Convert Word Docx to Markdown

pandoc -f docx -t markdown foo.docx -o

Convert Markdown to Word Docx

pandoc -f markdown -t docx -o foo.docx

Batch convert a folder with pandoc

for i in *.docx; do echo "$i" && pandoc -f docx -t markdown $i -o $; done