I have a folder that contains say 50 files in a sequential order:
cdf_1.txt
cdf_2.txt
cdf_3.txt
cdf_3.txt
.
.
.
cdf_50.txt.
I need to merge these files in the same order into a single tab delimited file.
I used the following shell script:
for x in {1..50};
do cat cdf_${x}.txt >> All.txt;
done
This will merge the files in the same order and out put the All.txt.
What I need is to give a space between the contents of files in the All.txt so that I could know the contents of each file separately in the All.txt.
Is there a way to modify the above shell script to give a space between the content of every file?
Please let me know.