I have a file which has content that looks like this:19.58 1925 Alpha20.40 1924 Otter13.66 1920 GoldI am trying to sort it column by column to output the following:13.40 1920 Alpha19.58 1924 Gold20.66 1925 OtterI have tried various combinations of code, e.g.:cat files | sort -t. -k1,1n | sort -t   -k2,2n -k3,3r k4,4nbut this doesn't output the wanted result. How could I achieve the sorting that I mentioned?
Sorting more than one column
shell script;text processing;sort
printf %s.%s %s %s\n $(paste <(awk -F'[. ]' '{print $1}' file | sort -n) <(awk -F'[. ]' '{print $2}' file | sort -n) <(awk -F'[. ]' '{print $3}' file | sort -n) <(awk -F'[. ]' '{print $4}' file | sort))Output:13.40 1920 Alpha19.58 1924 Gold20.66 1925 Otter