I have many files which each one contain many arrays(like input 1 and 2, below). Each array has two element numbers in the second row. I need to use a logical criterion to choose the highest number for the first and second column of the second row and then to print the second number of the first row.
For example in the file input 1 presented below, I see that the highest number is 10.8 (for the first column of the second row), so I will print 6.1703(which is the number located in the first row of this array). And the other highest number is 10.1261 (for the second column of the second row) , so I will print 6.1932 (which is the number located in the first row of this array)
So, I need to ouput in this way for many array. Here, we present only two files and an output.
Input file1
1: 6.1703
10.8 2.6
2: 6.1932
7.01640 10.1261
3: 6.5664
6.356 8.1
4: 8.0923
1.41 7.6
Input file2
1: 7.2703
3.8 8.6
2: 7.6892
4.7 7.6576
3: 7.85874
16.356 5.1
4: 9.8348
4.1 3.6
Output
6.1703 6.1932
7.85874 7.2703