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

From: Jim Meyering <[email-masked]>
Date: Tue, 18 Oct 2011 11:29:29 +0200

Bernhard Rosenkraenzer wrote:

> On Mon, 17 Oct 2011 20:22:52 -0600, Eric Blake wrote:
>> On 10/17/2011 06:59 PM, Bernhard Rosenkraenzer wrote:
>> Thanks for the report.  Unfortunately, you did not provide enough
>> information to reproduce this - for example, what platform are you
>> running on?
>
> Fairly current Linux -- kernel 3.1-rc9, eglibc 2.14.1
>
>>  Can you narrow it down to a single file of say 5 or so
>> lines?  Can you reproduce the problem with shorter input lines?
>
> Yes:
> [bero@matterhorn ~]$ echo
> libcore/luni/src/main/java/java/security/cert/X509CRLSelector.java
> libcore/luni/src/main/java/java/security/cert/X509CertSelector.java
> libcore/luni/src/main/java/java/security/cert/X509Certificate.java
> libcore/luni/src/main/java/javax/security/cert/X509Certificate.java'
> |tr ' ' '\n' |sort -u --debug

So far, I've been unable to reproduce that on Fedora 16 or Debian unstable
both x86_64.  I.e., the following (equivalent to above, but with no long
lines) always prints the four input lines:

cert=libcore/luni/src/main/java/java/security/cert
echo \
 $cert/X509CRLSelector.java \
 $cert/X509CertSelector.java \
 $cert/X509Certificate.java \
 libcore/luni/src/main/java/javax/security/cert/X509Certificate.java \
 |tr ' ' '\n' |sort -u --debug