You give a lot of background, but it's hard to tell what you actually want on a functional level, so I'm mostly guessing about how your files are structured here. In future, please provide less background and more information that is relevant to the question so that you can be helped more efficiently.
If you want to compile all *.md
files in the current directory into their own files:
for file in *.md; do
pandoc -f markdown -t html "$file"
done
If you want to compile all *.md
files in the current directory into their own files, recursively:
find . -name '*.md' -exec pandoc -f markdown -t html {} \;
If you want to compile all *.md
files in the current directory into one file:
pandoc -f markdown -t html -o foo.html *.md
If you want to compile all *.md
files in the current directory into one file, recursively (not POSIX):
pandoc -f markdown -t html <(find . -name '*.md' -exec cat {} +) -o foo.html
Or (bash4+):
shopt -s globstar
pandoc -f markdown -t html -o foo.html **/*.md