Similar to Sorting lines from longest to shortest, how can I sort all of the lines in a file from shortest to longest? E.g.”
This is a long sentence. This is not so long. This is not long.
That becomes:
This is not long. This is not so long. This is a long sentence.
It’s almost exactely the same as in the link you gave
the
-roption was for reversing the sort.