#!/bin/bash
TEXT='apple V$NFY_Q6_rc V=0.741
apple V$HOXA7_01_rc V=0.454
apple V$ALPHACP1_01_rc V=0.695
orange V$SP4_Q5 V=0.747
grapes V$SP1_Q2_01 V=0.677
grapes V$SP1_Q6_01_rc V=0.685
grapes V$SP1_Q6_rc V=0.884'
echo "Unsorted:"
awk -F'[ =]' '$NF>a[$1]{a[$1]=$NF;b[$1]=$0}END{for (i in b) print b[i]}' <<< "$TEXT"
echo "========
Sorted:"
awk -F'[ =]' '$NF>a[$1]{a[$1]=$NF;b[$1]=$0}END{for (i in b) print b[i]}' <<< "$TEXT" | sort -t= -nk2
IyEvYmluL2Jhc2gKClRFWFQ9J2FwcGxlICAgViRORllfUTZfcmMgVj0wLjc0MQphcHBsZSAgIFYkSE9YQTdfMDFfcmMgICBWPTAuNDU0CmFwcGxlICAgViRBTFBIQUNQMV8wMV9yYyAgICBWPTAuNjk1Cm9yYW5nZSAgViRTUDRfUTUgICAgVj0wLjc0NwpncmFwZXMgIFYkU1AxX1EyXzAxIFY9MC42NzcKZ3JhcGVzICBWJFNQMV9RNl8wMV9yYyAgVj0wLjY4NQpncmFwZXMgIFYkU1AxX1E2X3JjIFY9MC44ODQnCgoKZWNobyAiVW5zb3J0ZWQ6Igphd2sgLUYnWyA9XScgJyRORj5hWyQxXXthWyQxXT0kTkY7YlskMV09JDB9RU5Ee2ZvciAoaSBpbiBiKSBwcmludCBiW2ldfScgPDw8ICIkVEVYVCIKZWNobyAiPT09PT09PT0KU29ydGVkOiIKYXdrIC1GJ1sgPV0nICckTkY+YVskMV17YVskMV09JE5GO2JbJDFdPSQwfUVORHtmb3IgKGkgaW4gYikgcHJpbnQgYltpXX0nIDw8PCAiJFRFWFQiIHwgc29ydCAtdD0gLW5rMg==