I have two files - one contains the addresses (line numbers) and the other one data, like this:
address file:
2
4
6
7
1
3
5
data file
1.000451451
2.000589214
3.117892278
4.479511994
5.484514874
6.784499874
7.021239396
I want to randomize the data file based on the numbers of address files so I get:
2.000589214
4.479511994
6.784499874
7.021239396
1.000451451
3.117892278
5.484514874
I want to do it either in python or in bash, but didn't yet find any solution.