Concatenate multiple files with two blank lines as delimiter

filespastetext processing

I'm trying to join Markdown files with two newlines between each file.

I've tried using the following command:

paste -sd '\n\n' file1.md file2.md

This joins the files with a newline, but not two newlines, as I need.

What command can I use to join an arbitrary number of files with two \n characters between each join?

Best Answer

With paste:

:|paste -sd'\n' file1.md - - file2.md
Related Question