3 ms·
At the end, it doesn't look that bad. Of course using the csv format is a bad start in unix. Much better to convert everything to tsv and work from there. In
by enriquto 6y ago
At the end, it doesn't look that bad. Of course using the csv format is a bad start in unix. Much better to convert everything to tsv and work from there. In that case the "obvious" shell solution is quite clear.
<foo.tsv awk '{print $4+$7,$0}' | sort -n -k1 | cut -f2-