I have a large dataset as given below:
35.7337 408 0.5
35.732 407 0.5
35.7301 406 0.5
35.7281 405 0.5
35.7259 404 0.5
35.7236 403 0.5
35.7212 402 0.5
35.7187 401 0.5
35.7162 400 0.5
35.7136 399 0.5
35.711 398 0.5
35.7085 397 0.5
35.706 396 0.5
35.7036 395 0.5
35.7013 394 0.5
35.6992 393 0.5
Now, I would like to get max value of column1; only among the values whose column2 is less than 400 and also Max value of column1 whose column2 is greater than 400. There are no negative values in column 2 and column1. column 2==400 is not required as the expected outcome shall be far away from $2==400.
So my desired output
35.7136 (second column value <400)
35.7337 (second column value > 400)
awk
. Hints: use conditions like$2 < 400
to implement different calculations for all cases, print the results inEND