I would like to paste an output file from a loop side to side with each file generated from the loop without overwriting the file.
If it was just append it would be fine with >> but struggling to find a way where I can keep adding to a file so columns side by side
cat a.txt >> final.txt
The files I have are in the format
File 1 file 2
123 108
176 193
123 145
I would like to paste these together
paste -d ' ' file1.txt file2.txt > final.txt
I would then like to continue adding to the file final with iterations through the loop
paste -d ' ' file3.txt final.txt >>final.txt
The output I would like then would have 3 columns- i.e file3.txt is not appended to the bottom thus increasing rows but added to the side like in a normal paste so the column no increases with each pase
123 108 125
176 193 478
123 145 645
Any help would be much appreciated