Depending on the type of data, sorting may take a long time. We can get the result without sorting (but using more memory) like this:
awk 'a[$1]<$2{a[$1]=$2}END{for(i in a){print(i,a[i])}}' infile
Depending on the type of data, sorting may take a long time. We can get the result without sorting (but using more memory) like this:
awk 'a[$1]<$2{a[$1]=$2}END{for(i in a){print(i,a[i])}}' infile