127.0.0.1:8081
127.0.0.1:878
127.0.0.1:80
137.30.30.1:8080
137.30.30.1:80
127.0.0.1:878
137.30.30.1:8080
$ cat test.txt | sort -u
127.0.0.1:80
127.0.0.1:8081
127.0.0.1:878
137.30.30.1:80
137.30.30.1:8080
$ cat test.txt | awk -F ":" ' { print $1 } ' | sort -u
127.0.0.1
137.30.30.1