programmerc
Programmer
I've got 2D histogram data output
6.5 -1.25 10.2804
6.5404 -1.25 10.4907
6.58081 -1.25 10.8087
6.62121 -1.25 10.4686
6.66162 -1.25 10.506
6.70202 -1.25 10.3084
6.74242 -1.25 9.68256
6.78283 -1.25 9.41229
6.82323 -1.25 9.43078
6.86364 -1.25 9.62408
6.90404 -1.25 9.23871
6.94444 -1.25 9.4298
6.98485 -1.25 9.42173
7.02525 -1.25 9.45413
7.06566 -1.25 9.2722
...
6.5 -1.21717 10.3285
6.5404 -1.21717 11.1678
6.58081 -1.21717 10.8977
6.62121 -1.21717 10.8864
6.66162 -1.21717 10.3389
6.70202 -1.21717 9.96492
6.74242 -1.21717 10.4141
6.78283 -1.21717 10.1318
I need to sort the data in both X and Y column simultaneously, to get ordered pairs (X,Y) from smallest to largest.
sort -k1,1n -k2,2n inputdata.dat
did not work
6.5 -1.25 10.2804
6.5404 -1.25 10.4907
6.58081 -1.25 10.8087
6.62121 -1.25 10.4686
6.66162 -1.25 10.506
6.70202 -1.25 10.3084
6.74242 -1.25 9.68256
6.78283 -1.25 9.41229
6.82323 -1.25 9.43078
6.86364 -1.25 9.62408
6.90404 -1.25 9.23871
6.94444 -1.25 9.4298
6.98485 -1.25 9.42173
7.02525 -1.25 9.45413
7.06566 -1.25 9.2722
...
6.5 -1.21717 10.3285
6.5404 -1.21717 11.1678
6.58081 -1.21717 10.8977
6.62121 -1.21717 10.8864
6.66162 -1.21717 10.3389
6.70202 -1.21717 9.96492
6.74242 -1.21717 10.4141
6.78283 -1.21717 10.1318
I need to sort the data in both X and Y column simultaneously, to get ordered pairs (X,Y) from smallest to largest.
sort -k1,1n -k2,2n inputdata.dat
did not work