# cat host 140.117.1.77 140.117.11.7 140.1.99.1 # sort host 140.117.11.7 140.117.1.77 140.1.99.1 # sort -t. -nk1,1 -k2,2 -k3,3 -k4,4 host 140.1.99.1 140.117.1.77 140.117.11.7