I have a CSV like this
Parameter Values,Count,% of Results
" david;dd@gmail.com;10300 "," 15 "," 50.0% "
" david;dd@gmail.com;12300 "," 15 "," 50.0% "
" davidk;dk@gmail.com;32300 "," 15 "," 50.0% "
" joe;joe@gmail.com;9200 "," 15 "," 50.0% "
" john;jj@gmail.com;1500 "," 15 "," 50.0% "
I want to get the line that has the highest number value, in this case 32300
I already made an attempt at this but it uses several commands
export max=$(awk -F, '{split($1,a,";"); print a[3] }' contestEntryTest.csv | tr -d ' "' | sort -nr | head -n 1) ; grep $max contestEntryTest.csv
How can i do the above in less commands or one command, how would a more experienced bash programmer do the above problem, just for the learning experience.
Cheers!
You can use sort, if the file is demo.csv, then