GNU bug report logs - #6285
a possible bug of "sort -un", it is definitely not caused by language setting

Previous Next

Package: coreutils;

Reported by: daimh <daimh <at> umich.edu>

Date: Thu, 27 May 2010 20:33:01 UTC

Severity: normal

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6285 in the body.
You can then email your comments to 6285 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6285; Package coreutils. (Thu, 27 May 2010 20:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to daimh <daimh <at> umich.edu>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 27 May 2010 20:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: daimh <daimh <at> umich.edu>
To: bug-coreutils <at> gnu.org
Subject: a possible bug of "sort -un", it is definitely not caused by
	language setting
Date: Thu, 27 May 2010 16:30:11 -0400
Hi,

	
	echo -e "3\n\n0"|sort -un


	0 is missing from output, is this a possible bug?


Best,
Manhong




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6285; Package coreutils. (Thu, 27 May 2010 22:53:01 GMT) Full text and rfc822 format available.

Message #8 received at 6285 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: daimh <daimh <at> umich.edu>
Cc: 6285 <at> debbugs.gnu.org
Subject: Re: bug#6285: a possible bug of "sort -un",	it is definitely not
	caused by language setting
Date: Thu, 27 May 2010 16:52:19 -0600
[Message part 1 (text/plain, inline)]
On 05/27/2010 02:30 PM, daimh wrote:
> Hi,
> 
> 	
> 	echo -e "3\n\n0"|sort -un

'echo -e' is inherently non-portable; you should get in the habit of
using printf(1) instead.

> 
> 
> 	0 is missing from output, is this a possible bug?

Thanks for the report.  However, I don't think it is a bug.  The empty
line, when forced to take on a numeric value, is equivalent to 0.  And
since you specified unique entries only, sort only printed the empty
line (the first of the two matching lines that it encountered).

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6285; Package coreutils. (Fri, 28 May 2010 15:53:02 GMT) Full text and rfc822 format available.

Message #11 received at 6285 <at> debbugs.gnu.org (full text, mbox):

From: daimh <daimh <at> umich.edu>
To: Eric Blake <eblake <at> redhat.com>
Cc: 6285 <at> debbugs.gnu.org
Subject: Re: bug#6285: a possible bug of "sort -un",	it is definitely not
	caused by language setting
Date: Fri, 28 May 2010 09:00:31 -0400
Hi Eric,


	That explained it, thanks a lot for your help!


Best,
Manhong
On Thu, 2010-05-27 at 16:52 -0600, Eric Blake wrote:
> On 05/27/2010 02:30 PM, daimh wrote:
> > Hi,
> > 
> > 	
> > 	echo -e "3\n\n0"|sort -un
> 
> 'echo -e' is inherently non-portable; you should get in the habit of
> using printf(1) instead.
> 
> > 
> > 
> > 	0 is missing from output, is this a possible bug?
> 
> Thanks for the report.  However, I don't think it is a bug.  The empty
> line, when forced to take on a numeric value, is equivalent to 0.  And
> since you specified unique entries only, sort only printed the empty
> line (the first of the two matching lines that it encountered).
> 




Reply sent to Bob Proulx <bob <at> proulx.com>:
You have taken responsibility. (Fri, 28 May 2010 19:42:02 GMT) Full text and rfc822 format available.

Notification sent to daimh <daimh <at> umich.edu>:
bug acknowledged by developer. (Fri, 28 May 2010 19:42:02 GMT) Full text and rfc822 format available.

Message #16 received at 6285-done <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: daimh <daimh <at> umich.edu>
Cc: 6285-done <at> debbugs.gnu.org
Subject: Re: bug#6285: a possible bug of "sort -un", it is definitely not
	caused by language setting
Date: Fri, 28 May 2010 13:41:04 -0600
daimh wrote:
> Hi Eric,
> 	That explained it, thanks a lot for your help!
> Best,
> Manhong

Thank you for letting us know.  With that information I am going to
close the bug report with this message.

Bob




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 26 Jun 2010 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.