I have several Markdown (.md
) files in a folder and I want to concatenate them and get a final Markdown file using Pandoc. I wrote a bash file like this:
#!/bin/bash
pandoc *.md > final.md
But I am getting the following error when I double-click on it:
pandoc: *.md: openBinaryFile: invalid argument (Invalid argument)
and the final.md
file is empty.
If I try this:
pandoc file1.md file2.md .... final.md
I am getting the results I expect: a final.md
file with the contents of all the other Markdown files.
On macOS it works fine. Why doesn't this work on Windows?