scripting fun

Cameron Hutchison lists at xdna.net
Thu Jun 5 21:30:32 UTC 2008


Mike Bird <mgb-ubuntu at yosemite.net> writes:

>(3) For uniq IPs we need "sort -n | uniq" rather than "sort -nu".

Why? sort -n seems wrong in the first place since while IP addresses
have numeric components, they are not numeric themselves.

Furthermore, I expect sorting numerically will not work with join(1)
or comm(1) since they would expect lexographic sorting.

It seems to me a simpler "sort -u" should do the trick.

.




More information about the ubuntu-users mailing list