GNU bug report logs - #7407
about the order result of the sort command

Previous Next

Package: coreutils;

Reported by: 黄东喜 <dongxi.huang <at> sinofriends.com>

Date: Mon, 15 Nov 2010 08:37:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: 黄东喜 <dongxi.huang <at> sinofriends.com>
Subject: bug#7407: closed (Re: bug#7407: about the order result of the
 sort command)
Date: Mon, 15 Nov 2010 16:49:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#7407: about the order result of the sort command  

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 7407 <at> debbugs.gnu.org.

-- 
7407: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7407
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: 7407-done <at> debbugs.gnu.org,
	黄东喜 <dongxi.huang <at> sinofriends.com>
Subject: Re: bug#7407: about the order result of the sort command
Date: Mon, 15 Nov 2010 16:53:06 +0000
On 15/11/10 16:23, Eric Blake wrote:
> On 11/15/2010 01:17 AM, 黄东喜 wrote:

>>
>> It is different from the sort order of the “join” command.
> 
> Reread 'join --help':
> 
>>        Important:  FILE1  and  FILE2 must be sorted on the join fields.  E.g.,
>>        use ` sort -k 1b,1 ' if `join' has no options, or use ` join -t '' ' if
>>        `sort'  has no options.  Note, comparisons honor the rules specified by
>>        `LC_COLLATE'.  If the input is not sorted  and  some  lines  cannot  be
>>        joined, a warning message will be given.
> 
> If you correctly sorted with -k 1b,1 (or if you correctly used join -t
> ''), then you will get consistent results for your current locale
> (whether or not you also choose to change things to require LC_ALL=C).

join -t '' is a recent addition, with join -t '\0' being the old way to achieve the same.
I'm marking this done as from the example the poster seems to want: sort -k 1b,1

cheers,
Pádraig.

[Message part 3 (message/rfc822, inline)]
From: 黄东喜 <dongxi.huang <at> sinofriends.com>
To: <bug-coreutils <at> gnu.org>
Subject: about the order result of the sort command  
Date: Mon, 15 Nov 2010 16:17:54 +0800
[Message part 4 (text/plain, inline)]
[huangdongxi <at> localhost ~]$ echo "1001661 277

> 1001662 888

> 100166 73" | sort

1001661 277

1001662 888

100166 73

 

It should be

100166 73

1001661 277

1001662 888

 

 

It is different from the sort order of the “join” command.

 

 

Tel: 0755-86676269, 13510610982

Email:dongxi.huang <BLOCKED::mailto:.zeng <at> sinofriends.com> @sinofriends.com


珍爱公司中友集团旗下公司
Zhenai Inc.,a SinoFriends Inc. Company


网址: <BLOCKED::http://www.zhenai.com/> www.zhenai.com
地址:深圳市科技园北区朗山路11号同方信息港A座三楼
电话:0755-86296333邮编:518057


 


本邮件及其附件内容均属于中友集团公司保密信息,请收件人善尽保密之义务。
未经许可,请勿向任何无关的他人泄漏、转发、复制、散布、或允许使用本邮件信
息。如果您错收了本邮件,请即刻通知发件人,并删除本邮件。

 

 

[Message part 5 (text/html, inline)]

This bug report was last modified 14 years and 244 days ago.

Previous Next


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