Combine multiple text files into one file

Solution 1:

To have empty lines betwen files:

cat file1 newline file2 newline file3 > newfile

Where 'newline' is file with empty line.

Solution 2:

You can use the AWK utility:

awk 'FNR==1{print ""}{print}' *files > newfile

Source: https://stackoverflow.com/questions/1653063/how-do-i-include-a-blank-line-between-files-im-concatenating-with-cat

Solution 3:

for file in *.txt; do (cat "${file}"; echo) >> concatenated.txt; done

The above will append the contents of eacb txt file into concatenated.txt adding a new line between them.