What is the simplest way to sort a list of lines, sorting on the last field of each line? Each line may have a variable number of fields.
Something like
awk '{print $NF,$0}' file | sort | cut -f2- -d' '
Basically, this command does: