FILES=RJ/001.md RJ/002.md Ioan/001.md RJ/003.md Carter/001-a.md RJ/004-a.md Carter/001-b.md Ioan/002.md RJ/004-b.md Carter/002.md RJ/005-a.md Ioan/003-a.md RJ/005-b.md Ioan/003-b.md Carter/003.md RJ/006.md Qoheleth/001-a.md Carter/004.md RJ/007.md Qoheleth/001-b.md Carter/005.md RJ/008.md Ioan/003-c.md RJ/009.md Carter/006.md Ioan/003-d.md RJ/010.md Ioan/004.md Sasha/001.md Ioan/005.md RJ/011.md Carter/007.md Qoheleth/002.md RJ/012.md Ioan/006.md Sasha/002.md RJ/013.md Carter/008.md Ioan/006-b.md Carter/009.md RJ/014.md Carter/010.md Ioan/007.md RJ/015.md Carter/011.md Qoheleth/004.md Ioan/008.md RJ/016.md Qoheleth/005.md Ioan/009.md Qoheleth/006.md Ioan/010.md Sasha/003.md Ioan/011.md Sasha/005.md RJ/017.md .PHONY: cat cat: -rm qoheleth.md for i in $(FILES); do \ head -n 1 $$i | sed -e 's/%title /\n## /' >> qoheleth.md; \ tail -n +3 $$i >> qoheleth.md; \ done