Subject: reply: bug#7407: about the order result of the sort command

From: 黄东喜 <[email-masked]>
Date: Tue, 16 Nov 2010 09:56:42 +0800

Get it, thank you for your help. :)

-----邮件原件-----
发件人: Pádraig Brady [mailto:[email-masked]] 
发送时间: 2010年11月16日 0:53
收件人: Eric Blake
抄送: 黄东喜; [email-masked]
主题: Re: bug#7407: about the order result of the sort command

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.