Directory ~/a which contains subdirectories ~/a/b ~/a/c ~/a/d which themselves contain markdown files ~/a/b/1.md ~/a/c/2.md ~a/d/3.md and so on. How do I convert all the .md files in all of the subdirectories of ~/a to .txt files
I searched for possible answers and found pandoc but don’t know if it has the functionality and assume there is an preinstalled converter in debian which will be easier with a script.
2
Answers
When searching how to remove the file extension so it wouldn't save as md.txt after converting with the above script, I came across this:
find . -name '*.md' -type f | while read NAME ; do mv "${NAME}" "${NAME%.md}" ; done
Which converted all of the .md to plain text document 'UTF-8 Unicode text' which is fine for my needs.
Like this: