I have a file containing (x,y1) values sorted numerically according to the second column
0 0.0
8 0.1
4 0.2
. .
which is the reference order.
Another file contains (x,y2) sorted numerically
0 0.0
4 0.6
8 0.8
I want to re-sort the last file values so that the output looks like
0 0.0
8 0.8
4 0.6
The pattern is: this order matches the reference order in the sense of the second column.