I have a couple of text files
which are named as
1.txt
2.txt
1000.txt
11.txt
I want to cat/merge the contents of each text file into one single file like this
1
content of 1.txt
2
content of 2.txt
1000
content of 1000.txt
11
content of 11.txt
I can merge the files and insert a space between the contents of the files using the awk
awk 'FNR==1{print ""}1' *.txt
But would like to know how to modify the above awk command to include the file names (numbers) at the space between merged files.
Please let me know