Subject: bug#9780: sort -u throws out non-duplicates

From: Bernhard Rosenkraenzer <[email-masked]>
Date: Tue, 18 Oct 2011 01:59:12 +0100

[bero@matterhorn tmp]$ wget http://bero.eu/java-source-list
[...]
[bero@matterhorn tmp]$ tr ' ' '\n' <java-source-list |sort |grep 
X509Certificate
libcore/luni/src/main/java/java/security/cert/X509Certificate.java
libcore/luni/src/main/java/javax/security/cert/X509Certificate.java

This is correct...

[bero@matterhorn tmp]$ tr ' ' '\n' <java-source-list |sort -u |grep 
X509Certificate
libcore/luni/src/main/java/javax/security/cert/X509Certificate.java

Note the missing .../java/java/security/cert/X509Certificate.java

[bero@matterhorn tmp]$ tr ' ' '\n' <java-source-list |sort |uniq |grep 
X509Certificate
libcore/luni/src/main/java/java/security/cert/X509Certificate.java
libcore/luni/src/main/java/javax/security/cert/X509Certificate.java

This is correct

The problem occurs (at least) with sort from coreutils 8.12, 8.13 and 
8.14.

ttyl
bero