[bash] 뒤섞인 ip 정렬

뒤썩인 ip 정렬 하기.

sh-3.00# cat ip.txt
219.84.184.237
123.232.233.1
111.252.99.194
61.62.169.154
61.62.169.1
222.12.1.4
120.101.1.9
131.29.9.1

sh-3.00#  <FONT color=#ff0000>cat ip.txt | sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4</FONT>
61.62.169.1
61.62.169.154
111.252.99.194
120.101.1.9
123.232.233.1
131.29.9.1
219.84.184.237
222.12.1.4
sh-3.00#
Written on August 5, 2010