I have multiple files (~15), each with multi column data (tab seperated). For example:
File1
aa1 399 1815
aa2 1908 4064
aa3 4523 5656
File2
bb1 5304317 5305057
bb2 5305057 5305824
bb3 5306871 5307875
etc.
I want to read the 2nd column of each file and print them next to each other, to create a 15 column output. For example:
Output
399 5304317 7526 12455
1908 5305057 8195 14538
4523 5306871 9216 15150
Each column is from different file. Notice the first column of Output is the 2nd column of File1, the sectond column of Output is the 2nd column of File2.
I thought of using paste. But it puts the whole data from each input file. How can this be accomplished?