Say I have three files
file1
1 10.0
2 13.0
3 14.0
file2
1 14.0
2 11.0
3 12.0
file3
1 9.0
2 11.0
3 4.0
And I want to combine the files to one output
outputfile
10.0 14.0 9.0
13.0 12.0 11.0
14.0 12.0 4.0
All files have the same exact number of lines. The second column of each file will be need to be added to the output file
values need to be separated by one space.
I would like to learn how to do this for multiple files, up to 4 in awk or linux terminal.
Given your new question:
To avoid hard-coding the field numbers in the awk part so it'd work as-is with any output from paste: