5

Is there an easy way to strip all markdown from a text file from the command line?

A solution that is installable with apt is preferable. But failing that apt is better than pip is better than gem is better than npm (for me).

11

Install pandoc with:

$ sudo apt install pandoc

Next run it:

$ pandoc  --from markdown --to plain -o output.txt input.md
|improve this answer|||||
  • i get unexpected results when testing pandoc online: https://pandoc.org/try/?text=the+**context**+is+in+%5Bthis+link%5D(https%3A%2F%2Fwww.test.com)&from=markdown_strict&to=plain – user1063287 Jul 22 '19 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.