On Fri, Dec 28, 2012 at 03:40:50PM +0100, Jan Stary wrote:

> I have a list of IP addresses.
> Sorting them with sort -n works as expected.
> Sorting them with sort -u works as expected.
> 
> $ sort -u /tmp/list
> 173.194.64.26
> 173.194.64.27
> 173.194.65.26
> 173.194.65.27
> 173.194.66.26
> 173.194.66.27
> 173.194.67.26
> 173.194.67.27
> 173.194.69.26
> 173.194.70.26
> 173.194.70.27
> 173.194.71.26
> 173.194.71.27
> 173.194.78.26
> 173.194.78.27
> 
> But:
> 
> $ sort -u -n /tmp/list
> 173.194.70.27
> 
> This is just the last one in the file.
> Am I missing something obvious?
> 
>       Jan

Yes, all lines have the value 173.194. -u picks one of them to print.

        -Otto

Reply via email to