This question already has an answer here:
- Print two files in two columns 4 answers
If I have a folder with the following file names:
cluster_sizes_0.txt cluster_sizes_1.txt cluster_size_2.txt
Each file contains a single column of values.
Is there a command within linux such that I could combine all files into cluster_all.txt?
The first column in this new file would correspond to
cluster_sizes_0.txt, the second column would be
There could be as many as 200 cluster txt files, but it changes for each folder. I am looking for a way to combine these files, instead of copying each one by one.
Also, I need to make sure they are pasted into the file in order. This may have some issues with the numbering system, since I only include single digits if below 10.
paste cluster_size.* > cluster_all.txt doesn't paste them in order due to the numbering. How can I fix the numbering without manually changing all of them?