Use a group of commands to combine output into a single stream:
{ echo -e "# Final version (reflecting my edits)\n\n" cat final.md echo -e "\n\n# The changes I made\n\n" cat edit.md echo -e "\n\n#Your original version\n\n" cat original.md } > combined.md
There are tricks that you can play with substitution substitution and command substitution (see Lev Levitsky's answer) to do it all with one command (instead of the separate cat processes used here), but it should be quite efficient with so many files.
source share