If the length is in the 4th column, sort -n -k4 should do the trick.
If the answer is to determine the length, then you are looking for a preprocessing step before sorting. Maybe python, which just prints the length of a partition divided by 7th space, like the last or first column.
source share